diff --git a/paper-api/src/main/java/org/bukkit/Material.java b/paper-api/src/main/java/org/bukkit/Material.java index 4fe7b2ce79..6e42e7eeb3 100644 --- a/paper-api/src/main/java/org/bukkit/Material.java +++ b/paper-api/src/main/java/org/bukkit/Material.java @@ -42,6 +42,8 @@ public enum Material { POWERED_RAIL(27, PoweredRail.class), DETECTOR_RAIL(28, DetectorRail.class), WEB(30), + LONG_GRASS(31), + DEAD_BUSH(32), WOOL(35, Wool.class), YELLOW_FLOWER(37), RED_ROSE(38), @@ -102,6 +104,7 @@ public enum Material { DIODE_BLOCK_OFF(93, Diode.class), DIODE_BLOCK_ON(94, Diode.class), LOCKED_CHEST(95), + TRAP_DOOR(96, TrapDoor.class), // ----- Item Separator ----- IRON_SPADE(256, 1, 250), IRON_PICKAXE(257, 1, 250), @@ -205,6 +208,7 @@ public enum Material { BED(355), DIODE(356), COOKIE(357), + MAP(358), GOLD_RECORD(2256, 1), GREEN_RECORD(2257, 1); diff --git a/paper-api/src/main/java/org/bukkit/material/TrapDoor.java b/paper-api/src/main/java/org/bukkit/material/TrapDoor.java new file mode 100644 index 0000000000..ad231bb0d0 --- /dev/null +++ b/paper-api/src/main/java/org/bukkit/material/TrapDoor.java @@ -0,0 +1,44 @@ + +package org.bukkit.material; + +import org.bukkit.Material; + +/** + * Represents a trap door + */ +public class TrapDoor extends MaterialData implements Redstone { + public TrapDoor() { + super(Material.TRAP_DOOR); + } + + public TrapDoor(final int type) { + super(type); + } + + public TrapDoor(final Material type) { + super(type); + } + + public TrapDoor(final int type, final byte data) { + super(type, data); + } + + public TrapDoor(final Material type, final byte data) { + super(type, data); + } + + /** + * Gets the current state of this Material, indicating if it's powered or + * unpowered + * + * @return true if powered, otherwise false + */ + public boolean isPowered() { + return (getData() & 0x8) == 0x8; + } + + @Override + public String toString() { + return super.toString() + "[powered=" + isPowered() + "]"; + } +} \ No newline at end of file