me.armar.plugins.autorank.statsmanager.handlers
Class DummyHandler

java.lang.Object
  extended by me.armar.plugins.autorank.statsmanager.handlers.DummyHandler
All Implemented Interfaces:
StatsPlugin

public class DummyHandler
extends java.lang.Object
implements StatsPlugin

This class is used when no stats plugin is found. This does not do anything, but it allows the stats plugin to be gone so that there are no errors.

Author:
Staartvin

Constructor Summary
DummyHandler()
           
 
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
 

Constructor Detail

DummyHandler

public DummyHandler()
Method Detail

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 get
arguments - 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