Last active
December 26, 2015 23:32
-
-
Save justisr/bd0acbc6eabc43709ce7 to your computer and use it in GitHub Desktop.
Simple stained glass pain enum for all the available colors.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.bukkit.Material; | |
import org.bukkit.inventory.ItemStack; | |
public enum Pane { | |
WHITE(0), | |
ORANGE(1), | |
LIGHT_PURPLE(2), | |
LIGHT_BLUE(3), | |
YELLOW(4), | |
LIGHT_GREEN(5), | |
PINK(6), | |
DARK_GRAY(7), | |
LIGHT_GRAY(8), | |
AQUA(9), | |
PURPLE(10), | |
BLUE(11), | |
BROWN(12), | |
GREEN(13), | |
RED(14), | |
BLACK(15); | |
private short index; | |
private Pane(int damage) { | |
this.index = ((short) damage); | |
} | |
public int damage() { | |
return this.index; | |
} | |
public ItemStack getItem() { | |
return new ItemStack(Material.STAINED_GLASS_PANE, 1, this.index); | |
} | |
public static int id() { | |
return 160; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment