@Override
  public EnumRarity getCustomRarityType(String customRarity) {
    for (EnumRarity rarity : EnumRarity.class.getEnumConstants()) {
      if (rarity.name().equals(customRarity)) return rarity;
    }

    return EnumRarity.common;
  }
Example #2
0
 public SignInfo setRarity(int rarity) {
   return setRarity(EnumRarity.values()[rarity]);
 }