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 tracked by the server.


Nested Class Summary
static class Statistic.Type
          The type of statistic.
 
Enum Constant Summary
ANIMALS_BRED
           
BOAT_ONE_CM
           
BREAK_ITEM
           
CLIMB_ONE_CM
           
CRAFT_ITEM
           
DAMAGE_DEALT
           
DAMAGE_TAKEN
           
DEATHS
           
DIVE_ONE_CM
           
DROP
           
ENTITY_KILLED_BY
           
FALL_ONE_CM
           
FISH_CAUGHT
           
FLY_ONE_CM
           
HORSE_ONE_CM
           
JUMP
           
JUNK_FISHED
           
KILL_ENTITY
           
LEAVE_GAME
           
MINE_BLOCK
           
MINECART_ONE_CM
           
MOB_KILLS
           
PIG_ONE_CM
           
PLAY_ONE_TICK
           
PLAYER_KILLS
           
SWIM_ONE_CM
           
TREASURE_FISHED
           
USE_ITEM
           
WALK_ONE_CM
           
 
Method Summary
 Statistic.Type getType()
          Gets the type of this statistic.
 boolean isBlock()
          Checks if this is a substatistic dealing with blocks.
 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

ANIMALS_BRED

public static final Statistic ANIMALS_BRED

TREASURE_FISHED

public static final Statistic TREASURE_FISHED

JUNK_FISHED

public static final Statistic JUNK_FISHED

LEAVE_GAME

public static final Statistic LEAVE_GAME

JUMP

public static final Statistic JUMP

DROP

public static final Statistic DROP

PLAY_ONE_TICK

public static final Statistic PLAY_ONE_TICK

WALK_ONE_CM

public static final Statistic WALK_ONE_CM

SWIM_ONE_CM

public static final Statistic SWIM_ONE_CM

FALL_ONE_CM

public static final Statistic FALL_ONE_CM

CLIMB_ONE_CM

public static final Statistic CLIMB_ONE_CM

FLY_ONE_CM

public static final Statistic FLY_ONE_CM

DIVE_ONE_CM

public static final Statistic DIVE_ONE_CM

MINECART_ONE_CM

public static final Statistic MINECART_ONE_CM

BOAT_ONE_CM

public static final Statistic BOAT_ONE_CM

PIG_ONE_CM

public static final Statistic PIG_ONE_CM

HORSE_ONE_CM

public static final Statistic HORSE_ONE_CM

MINE_BLOCK

public static final Statistic MINE_BLOCK

USE_ITEM

public static final Statistic USE_ITEM

BREAK_ITEM

public static final Statistic BREAK_ITEM

CRAFT_ITEM

public static final Statistic CRAFT_ITEM

KILL_ENTITY

public static final Statistic KILL_ENTITY

ENTITY_KILLED_BY

public static final Statistic ENTITY_KILLED_BY
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

getType

public Statistic.Type getType()
Gets the type of this statistic.

Returns:
the type of this statistic

isSubstatistic

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

A substatistic exists en masse for each block, item, or entitytype, depending on getType().

This is a redundant method and equivalent to checking getType() != Type.UNTYPED

Returns:
true if this is a substatistic

isBlock

public boolean isBlock()
Checks if this is a substatistic dealing with blocks.

This is a redundant method and equivalent to checking getType() == Type.BLOCK

Returns:
true if this deals with blocks


Copyright © 2014. All rights reserved.