org.bukkit
Enum Statistic

java.lang.Object
  extended by java.lang.Enum<Statistic>
      extended by org.bukkit.Statistic
All Implemented Interfaces:
Serializable, Comparable<Statistic>

public enum Statistic
extends Enum<Statistic>

Represents a countable statistic, which is collected by the client


Enum Constant Summary
BREAK_ITEM
           
DAMAGE_DEALT
           
DAMAGE_TAKEN
           
DEATHS
           
FISH_CAUGHT
           
MINE_BLOCK
           
MOB_KILLS
           
PLAYER_KILLS
           
USE_ITEM
           
 
Method Summary
static Statistic getById(int id)
          Gets the statistic associated with the given ID.
 int getId()
          Gets the ID for this statistic.
 boolean isBlock()
          Checks if this is a substatistic dealing with blocks (As opposed to items)
 boolean isSubstatistic()
          Checks if this is a substatistic.
static Statistic valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Statistic[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DAMAGE_DEALT

public static final Statistic DAMAGE_DEALT

DAMAGE_TAKEN

public static final Statistic DAMAGE_TAKEN

DEATHS

public static final Statistic DEATHS

MOB_KILLS

public static final Statistic MOB_KILLS

PLAYER_KILLS

public static final Statistic PLAYER_KILLS

FISH_CAUGHT

public static final Statistic FISH_CAUGHT

MINE_BLOCK

public static final Statistic MINE_BLOCK

USE_ITEM

public static final Statistic USE_ITEM

BREAK_ITEM

public static final Statistic BREAK_ITEM
Method Detail

values

public static final Statistic[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Statistic c : Statistic.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static Statistic valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

getId

public int getId()
Gets the ID for this statistic.

Returns:
ID of this statistic

isSubstatistic

public boolean isSubstatistic()
Checks if this is a substatistic.

A substatistic exists in mass for each block or item, depending on isBlock()

Returns:
true if this is a substatistic

isBlock

public boolean isBlock()
Checks if this is a substatistic dealing with blocks (As opposed to items)

Returns:
true if this deals with blocks, false if with items

getById

public static Statistic getById(int id)
Gets the statistic associated with the given ID.

Parameters:
id - ID of the statistic to return
Returns:
statistic with the given ID


Copyright © 2013. All Rights Reserved.