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)
          Deprecated. Magic value
 int getId()
          Deprecated. Magic value
 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 are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
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 Statistic[] values()
Returns an array containing the constants of this enum type, in the order they are 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 are 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
NullPointerException - if the argument is null

getId

@Deprecated
public int getId()
Deprecated. Magic value

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

@Deprecated
public static Statistic getById(int id)
Deprecated. Magic value

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.