Files
2009scape/Server/src/main/content/data/Dyes.java
T
Ceikry a100affda2 Repository reorganisation
Unified kotlin and java into just src/main
Unified the rs09 and core packages
Took all content out of the core package, and placed it into the new content package
Reorganised all source code relating to content to be easier to find and explore
2023-01-26 13:59:28 +00:00

55 lines
840 B
Java

package content.data;
import core.game.node.item.Item;
/**
* Represents a dye.
* @author Vexia
*/
public enum Dyes {
BLACK(new Item(4622)),
RED(new Item(1763)),
YELLOW(new Item(1765)),
BLUE(new Item(1767)),
ORANGE(new Item(1769)),
GREEN(new Item(1771)),
PURPLE(new Item(1773)),
PINK(new Item(6955));
/**
* The dye item.
*/
private final Item item;
/**
* Constructs a new {@code Dyes} {@code Object}.
* @param item the item.
*/
Dyes(Item item) {
this.item = item;
}
/**
* Gets the dye for the item.
* @param item the item.
* @return the dye.
*/
public static Dyes forItem(Item item) {
for (Dyes d : values()) {
if (d.getItem().getId() == item.getId()) {
return d;
}
}
return null;
}
/**
* Gets the item.
* @return The item.
*/
public Item getItem() {
return item;
}
}