RedstoneTorch MaterialData + Redstone interface

This commit is contained in:
Dinnerbone
2011-01-15 20:30:27 +00:00
parent 774f93f5ec
commit 44e58503bd
2 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
package org.bukkit.material;
import org.bukkit.Material;
/**
* Represents a redstone torch
*/
public class RedstoneTorch extends Torch implements Redstone {
public RedstoneTorch(final int type) {
super(type);
}
public RedstoneTorch(final Material type) {
super(type);
}
public RedstoneTorch(final int type, final byte data) {
super(type, data);
}
public RedstoneTorch(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 getItemType() == Material.REDSTONE_TORCH_ON;
}
}