com.mineblown.challengescript.scripting
Class ScriptBlock

java.lang.Object
  extended by com.mineblown.challengescript.scripting.ScriptBlock

public class ScriptBlock
extends java.lang.Object


Field Summary
 byte data
           
 ScriptLocation location
           
 java.lang.String type
           
 
Constructor Summary
ScriptBlock(org.bukkit.block.Block block, com.mineblown.challengescript.challenge.Challenge challenge)
           
 
Method Summary
 void fall()
          Makes this block fall, link sand or gravel.
 byte getData()
          Gets the data value for the block.
 java.lang.String getType()
          Gets the type of this block.
 void playBreakEffect()
          Plays the break sound for this block type
 void playBreakEffect(java.lang.String material)
          Plays the break sound for the given material
 void setCracking(int stage)
          Sets the cracking animation state for this block.
 void setData(byte data)
          Sets the data value for the block.
 void setType(int type)
          Sets the type of this block
 void setType(java.lang.String name)
          Sets the type of this block.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

location

public ScriptLocation location

type

public java.lang.String type

data

public byte data
Constructor Detail

ScriptBlock

public ScriptBlock(org.bukkit.block.Block block,
                   com.mineblown.challengescript.challenge.Challenge challenge)
Method Detail

getType

public java.lang.String getType()
Gets the type of this block.

Returns:
The name of the type.

setType

public void setType(java.lang.String name)
Sets the type of this block.

Parameters:
name - The name of the type.

setType

public void setType(int type)
Sets the type of this block

Parameters:
type - The id of the type

getData

public byte getData()
Gets the data value for the block.

Returns:
The data value as a byte.

setData

public void setData(byte data)
Sets the data value for the block.

Parameters:
data - The value as a byte.

setCracking

public void setCracking(int stage)
Sets the cracking animation state for this block.

Parameters:
stage - How broken the block should look.

fall

public void fall()
Makes this block fall, link sand or gravel.


playBreakEffect

public void playBreakEffect()
Plays the break sound for this block type


playBreakEffect

public void playBreakEffect(java.lang.String material)
Plays the break sound for the given material

Parameters:
material - Material of the pretended block break