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
public Level getLevelFromItem(ItemStack item) {
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]));
} else {
return getLevelManager().getLowestLevel();