There's an easy way to make a list of all PotionEffectTypes: Code: public String getPotionEffectTypes() { StringBuilder sb = new StringBuilder(); PotionEffectType[] effects = PotionEffectType.values(); for (PotionEffectType effect : effects) { if (sb.length() > 0) { sb.append(", "); } if (effect != null) sb.append(effect.getName()); // If you don't want to have the names in CAPSLOCK, easily put a .toLowerCase(); behind } return sb.toString(); } You can remove the variable 'effects' for sure, you just have to put the 'PotionEffectType.values();' into the loop instead of 'effects' Enjoy!
effects is an array. Code: PotionEffectType effects = PotionEffectType.values(); should be Code: PotionEffectType[] effects = PotionEffectType.values();
Panjab Isn't this like, teaching people java? Each enum should have a values() method, but let me check Edit: nvm
xTrollxDudex Yep, all enums have the values() method. As its name suggests, it returns an array containing every value in the enum.