Added setters to applicable MaterialData classes.
By: sunkid <sunkid@iminurnetz.com>
This commit is contained in:
@@ -5,8 +5,6 @@ import org.bukkit.block.BlockFace;
|
||||
|
||||
/**
|
||||
* Represents a bed.
|
||||
*
|
||||
* @author sunkid
|
||||
*/
|
||||
public class Bed extends MaterialData implements Directional {
|
||||
|
||||
@@ -51,6 +49,14 @@ public class Bed extends MaterialData implements Directional {
|
||||
return (getData() & 0x8) == 0x8;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure this to be either the head or the foot of the bed
|
||||
* @param isHeadOfBed
|
||||
*/
|
||||
public void setHeadOfBed(boolean isHeadOfBed) {
|
||||
setData((byte) (isHeadOfBed ? (getData() | 0x8) : (getData() & ~0x8)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set which direction the head of the bed is facing. Note that this will
|
||||
* only affect one of the two blocks the bed is made of.
|
||||
|
||||
Reference in New Issue
Block a user