64public enum CurrencyType {
83 private static final ImmutableSet<CurrencyType> VALUES = ImmutableSet.copyOf(values());
89 CurrencyType(
int id,
Currency currency) {
91 this.currency = currency;
95 public static Optional<CurrencyType> lookup(
int id) {
96 return Arrays.stream(values()).filter(it -> it.getId() ==
id).findFirst();
103 public static boolean isCurrency(
int id) {
104 return VALUES.stream().filter(i -> i.currency.tangible()).anyMatch(i -> ((
ItemCurrency) i.currency).itemId ==
id);
107 public static String getValue(
Player player, CurrencyType currency) {
119 case KOLODION_POINTS:
143 case PRESTIGE_POINTS:
149 case SKILLING_POINTS:
156 if (player.clanChannel ==
null) {
167 public String toString() {
168 return name().toLowerCase().replace(
"_",
" ");