mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Add miss item flag check
Former-commit-id: 3e3ea81d0e774cdda8e90468b18b1b29dd0d93c6
This commit is contained in:
1 parent
cb8651c73f
commit
461e146e82
1 file changed
+1
-22
@@ -910,28 +910,7 @@ public class MsgUtil {
|
||||
} else {
|
||||
chatSheetPrinter.printLine(MsgUtil.getMessage("menu.this-shop-is-selling", p));
|
||||
}
|
||||
Map<Enchantment, Integer> enchs = new HashMap<>();
|
||||
if (items.hasItemMeta() && Objects.requireNonNull(items.getItemMeta()).hasEnchants()) {
|
||||
enchs = items.getItemMeta().getEnchants();
|
||||
}
|
||||
if (!enchs.isEmpty()) {
|
||||
chatSheetPrinter.printCenterLine(MsgUtil.getMessage("menu.enchants", p, ""));
|
||||
for (Entry<Enchantment, Integer> entries : enchs.entrySet()) {
|
||||
chatSheetPrinter.printLine(
|
||||
ChatColor.YELLOW + MsgUtil.getEnchi18n(entries.getKey()) + " " + entries.getValue());
|
||||
}
|
||||
}
|
||||
if (items.getItemMeta() instanceof EnchantmentStorageMeta) {
|
||||
EnchantmentStorageMeta stor = (EnchantmentStorageMeta) items.getItemMeta();
|
||||
enchs = stor.getStoredEnchants();
|
||||
if (!enchs.isEmpty()) {
|
||||
chatSheetPrinter.printLine(MsgUtil.getMessage("menu.stored-enchants", p));
|
||||
for (Entry<Enchantment, Integer> entries : enchs.entrySet()) {
|
||||
chatSheetPrinter.printLine(
|
||||
ChatColor.YELLOW + MsgUtil.getEnchi18n(entries.getKey()) + " " + entries.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
printEnchantment(p,shop,chatSheetPrinter);
|
||||
if (items.getItemMeta() instanceof PotionMeta) {
|
||||
PotionMeta potionMeta = (PotionMeta) items.getItemMeta();
|
||||
PotionEffectType potionEffectType = potionMeta.getBasePotionData().getType().getEffectType();
|
||||
|
||||
Reference in new issue
Block a user