|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BlockState
Represents a captured state of a block, which will not change automatically.
Unlike Block, which only one object can exist per coordinate, BlockState can exist multiple times for any given Block. Note that another plugin may change the state of the block and you will not know, or they may change the block to another type entirely, causing your BlockState to become invalid.
Method Summary | |
---|---|
Block |
getBlock()
Gets the block represented by this BlockState |
Chunk |
getChunk()
Gets the chunk which contains this block |
MaterialData |
getData()
Gets the metadata for this block |
byte |
getLightLevel()
Gets the light level between 0-15 |
Location |
getLocation()
Gets the location of this block |
Location |
getLocation(Location loc)
Stores the location of this block in the provided Location object. If the provided Location is null this method does nothing and returns null. |
byte |
getRawData()
|
Material |
getType()
Gets the type of this block |
int |
getTypeId()
Gets the type-id of this block |
World |
getWorld()
Gets the world which contains this Block |
int |
getX()
Gets the x-coordinate of this block |
int |
getY()
Gets the y-coordinate of this block |
int |
getZ()
Gets the z-coordinate of this block |
void |
setData(MaterialData data)
Sets the metadata for this block |
void |
setRawData(byte data)
|
void |
setType(Material type)
Sets the type of this block |
boolean |
setTypeId(int type)
Sets the type-id of this block |
boolean |
update()
Attempts to update the block represented by this state, setting it to the new values as defined by this state. |
boolean |
update(boolean force)
Attempts to update the block represented by this state, setting it to the new values as defined by this state. |
Methods inherited from interface org.bukkit.metadata.Metadatable |
---|
getMetadata, hasMetadata, removeMetadata, setMetadata |
Method Detail |
---|
Block getBlock()
MaterialData getData()
Material getType()
int getTypeId()
byte getLightLevel()
World getWorld()
int getX()
int getY()
int getZ()
Location getLocation()
Location getLocation(Location loc)
Chunk getChunk()
void setData(MaterialData data)
data
- New block specific metadatavoid setType(Material type)
type
- Material to change this block toboolean setTypeId(int type)
type
- Type-Id to change this block to
boolean update()
update(boolean)
boolean update(boolean force)
force
- true to forcefully set the state
byte getRawData()
void setRawData(byte data)
data
- The new data value for the block.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |