Fix error on 1.13 and 1.14 early spigot build.

Former-commit-id: c7d003532abc139d911f4560280495828a5e78f9
This commit is contained in:
Ghost_chu committed 2019-12-13 16:44:38 +08:00
1 parent ab51291f93
commit 8c841c3013
1 file changed
+3 -1
@@ -149,7 +149,9 @@ public class ArmorStandDisplayItem implements DisplayItem {
//Set item protect in the armorstand's hand
this.guardedIstack = DisplayItem.createGuardItemStack(this.originalItemStack, this.shop);
armorStand.setItemInHand(guardedIstack);
armorStand.getPersistentDataContainer().set(new NamespacedKey(plugin,"displayMark"),DisplayItemPersistentDataType.INSTANCE,DisplayItem.createShopProtectionFlag(this.originalItemStack,shop));
try {
armorStand.getPersistentDataContainer().set(new NamespacedKey(plugin, "displayMark"), DisplayItemPersistentDataType.INSTANCE, DisplayItem.createShopProtectionFlag(this.originalItemStack, shop));
}catch (Throwable ignored){}
Util.debugLog("Successfully safeGuard ArmorStand: " + armorStand.getLocation());
}