fixes SD305

This commit is contained in:
Brianna O'Keefe 2018-11-04 18:41:10 -05:00
parent 189e4c5dcb
commit f1637ca349

View File

@ -465,7 +465,7 @@ public class EpicHoppersPlugin extends JavaPlugin implements EpicHoppers {
@Override @Override
public Level getLevelFromItem(ItemStack item) { public Level getLevelFromItem(ItemStack item) {
if (item.getItemMeta().getDisplayName().contains(":")) { if (item.getItemMeta().getDisplayName().contains(":")) {
String arr[] = item.getItemMeta().getDisplayName().replace("§", "").split(":"); String arr[] = item.getItemMeta().getDisplayName().replace(String.valueOf(ChatColor.COLOR_CHAR), "").split(":");
return getLevelManager().getLevel(Integer.parseInt(arr[0])); return getLevelManager().getLevel(Integer.parseInt(arr[0]));
} else { } else {
return getLevelManager().getLowestLevel(); return getLevelManager().getLowestLevel();