diff --git a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java index 89b74105b..a141725fc 100644 --- a/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java +++ b/src/main/java/org/maxgamer/quickshop/util/MsgUtil.java @@ -905,7 +905,9 @@ public class MsgUtil { private static void printEnchantment(ChatSheetPrinter chatSheetPrinter, Map enchs) { for (Entry entries : enchs.entrySet()) { - chatSheetPrinter.printLine(ChatColor.YELLOW + MsgUtil.getEnchi18n(entries.getKey()) + " " + RomanNumber.toRoman(entries.getValue())); + //Use boxed object to avoid NPE + Integer level = entries.getValue(); + chatSheetPrinter.printLine(ChatColor.YELLOW + MsgUtil.getEnchi18n(entries.getKey()) + " " + RomanNumber.toRoman(level == null ? 1 : level)); } }