me.armar.plugins.autorank.statsmanager.handlers
Class StatsHandler
java.lang.Object
me.armar.plugins.autorank.statsmanager.handlers.StatsHandler
- All Implemented Interfaces:
- StatsPlugin
public class StatsHandler
- extends java.lang.Object
- implements StatsPlugin
|
Method Summary |
java.lang.String |
getCorrectStatName(java.lang.String statType)
Get the correct name of this stat |
int |
getNormalStat(java.lang.String statType,
java.lang.String[] arguments)
Get the value of a stat. |
boolean |
isEnabled()
Check whether the current stats plugin is enabled or not. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
plugin
private Autorank plugin
statsApi
private StatsAPIHandler statsApi
StatsHandler
public StatsHandler(Autorank instance,
StatsAPIHandler statsAPI)
isEnabled
public boolean isEnabled()
- Description copied from interface:
StatsPlugin
- Check whether the current stats plugin is enabled or not.
- Specified by:
isEnabled in interface StatsPlugin
- Returns:
- true if enabled; false otherwise
getNormalStat
public int getNormalStat(java.lang.String statType,
java.lang.String[] arguments)
- Description copied from interface:
StatsPlugin
- Get the value of a stat. You can only get stats that are of
StatsPlugin.statType.
NOTE: returns -1 when the current stats plugin doesn't support this stat.
- Specified by:
getNormalStat in interface StatsPlugin
- Parameters:
statType - Stat you want to getarguments - Provide arguments for the stat (playerName, worldName). 1st argument has to be the playername, 2nd argument must be world (can be null)
- Returns:
- value of the stat; -1 when the current stats plugin doesn't support this stat; -2 if stat name is invalid
getCorrectStatName
public java.lang.String getCorrectStatName(java.lang.String statType)
- Description copied from interface:
StatsPlugin
- Get the correct name of this stat
- Specified by:
getCorrectStatName in interface StatsPlugin
- Parameters:
statType - stat name that can be incorrect
- Returns:
- official name of the stat or null if not valid