Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.Difficulty Enum Reference

Public Member Functions

int getValue ()
 

Static Public Member Functions

static Difficulty getByValue (final int value)
 
 [static initializer]
 

Public Attributes

 PEACEFUL =(0)
 
 EASY =(1)
 
 NORMAL =(2)
 
 HARD =(3)
 

Detailed Description

Represents the various difficulty levels that are available.

Definition at line 10 of file Difficulty.java.

Member Function Documentation

static Difficulty org.bukkit.Difficulty.getByValue ( final int  value)
static

Gets the Difficulty represented by the specified value

Parameters
valueValue to check
Returns
Associative Difficulty with the given value, or null if it doesn't exist
Deprecated:
Magic value

Definition at line 63 of file Difficulty.java.

63  {
64  return BY_ID.get(value);
65  }
int org.bukkit.Difficulty.getValue ( )

Gets the difficulty value associated with this Difficulty.

Returns
An integer value of this difficulty
Deprecated:
Magic value

Definition at line 50 of file Difficulty.java.

50  {
51  return value;
52  }

Member Data Documentation

org.bukkit.Difficulty.EASY =(1)

Hostile mobs spawn, enemies deal less damage than on normal difficulty, the hunger bar does deplete and starving deals up to 5 hearts of damage. (Default value)

Definition at line 22 of file Difficulty.java.

org.bukkit.Difficulty.HARD =(3)

Hostile mobs spawn, enemies deal greater damage than on normal difficulty, the hunger bar does deplete and starving can kill players.

Definition at line 34 of file Difficulty.java.

org.bukkit.Difficulty.NORMAL =(2)

Hostile mobs spawn, enemies deal normal amounts of damage, the hunger bar does deplete and starving deals up to 9.5 hearts of damage.

Definition at line 28 of file Difficulty.java.

org.bukkit.Difficulty.PEACEFUL =(0)

Players regain health over time, hostile mobs don't spawn, the hunger bar does not deplete.

Definition at line 15 of file Difficulty.java.


The documentation for this enum was generated from the following file: