geforkt von Mirrors/Paper
Added new Materials
By: Dinnerbone <dinnerbone@dinnerbone.com>
Dieser Commit ist enthalten in:
Ursprung
6778c953f4
Commit
63a68b3e10
@ -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);
|
||||
|
||||
|
44
paper-api/src/main/java/org/bukkit/material/TrapDoor.java
Normale Datei
44
paper-api/src/main/java/org/bukkit/material/TrapDoor.java
Normale Datei
@ -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() + "]";
|
||||
}
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren