1
0
mirror of https://e.coding.net/circlecloud/MenuProtect.git synced 2024-11-21 10:48:46 +00:00

fix: 修复物品Lore为空时的BUG

This commit is contained in:
502647092 2016-05-17 13:35:53 +08:00
parent c14411a87a
commit ebbe4c4f1e

View File

@ -17,7 +17,7 @@ public class MarkUtil {
public static Map<String, List<String>> cmds = new HashMap<>(); public static Map<String, List<String>> cmds = new HashMap<>();
public static void handlerItemClick(final Player p, final ItemStack is) { public static void handlerItemClick(final Player p, final ItemStack is) {
if (hasMark(is)) { if (hasMark(is) && is.getItemMeta().hasLore()) {
for (final String lore : is.getItemMeta().getLore()) { for (final String lore : is.getItemMeta().getLore()) {
if (cmds.containsKey(lore)) { if (cmds.containsKey(lore)) {
for (final String cmd : cmds.get(lore)) { for (final String cmd : cmds.get(lore)) {