From 69fa9eaba534c49e0082f59d35d4d919b9f2c9ea Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Fri, 13 Dec 2013 21:35:04 -0800 Subject: [PATCH 1/2] Added getters for stats/StatsManager.java --- .../src/mineplex/core/stats/StatsManager.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/stats/StatsManager.java b/Plugins/Mineplex.Core/src/mineplex/core/stats/StatsManager.java index c73864b95..07e336f9b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/stats/StatsManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/stats/StatsManager.java @@ -109,6 +109,27 @@ public class StatsManager extends MiniPlugin return this; } + public void getStat(Player player, String table, String statName) + { + getStat(player.getName(), table, statName); + } + + public int getStat(String playerName, String table, String statName) + { + if (!_playerStatList.containsKey(table)) + { + System.out.println("Error getting stats for " + playerName + " on table " + table + " (" + statName + ") : TABLE DOES NOT EXIST!"); + return 0; + } + + if (!_playerStatList.get(table).containsKey(playerName)) + { + _playerStatList.get(table).put(playerName, new PlayerStats()); + } + + return _playerStatList.get(table).get(playerName).getStat(statName); + } + public void addStat(Player player, String table, String statName, int value) { addStat(player.getName(), table, statName, value); From ac049e0397c167adc1a435c0c39286b60316e260 Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Fri, 13 Dec 2013 21:36:57 -0800 Subject: [PATCH 2/2] FINE JUST FINE>>>>>> STUPID CHICKENS --- .../src/mineplex/core/stats/StatsManager.java | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/stats/StatsManager.java b/Plugins/Mineplex.Core/src/mineplex/core/stats/StatsManager.java index 07e336f9b..e8ef490ea 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/stats/StatsManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/stats/StatsManager.java @@ -108,27 +108,6 @@ public class StatsManager extends MiniPlugin return this; } - - public void getStat(Player player, String table, String statName) - { - getStat(player.getName(), table, statName); - } - - public int getStat(String playerName, String table, String statName) - { - if (!_playerStatList.containsKey(table)) - { - System.out.println("Error getting stats for " + playerName + " on table " + table + " (" + statName + ") : TABLE DOES NOT EXIST!"); - return 0; - } - - if (!_playerStatList.get(table).containsKey(playerName)) - { - _playerStatList.get(table).put(playerName, new PlayerStats()); - } - - return _playerStatList.get(table).get(playerName).getStat(statName); - } public void addStat(Player player, String table, String statName, int value) {