From 135d0f2b9066e17b40ac0ac413669db639d06cbd Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Mon, 25 Mar 2019 17:14:32 +0800 Subject: [PATCH] feat: add version check --- src/main/resources/plugins/ItemTag.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/resources/plugins/ItemTag.js b/src/main/resources/plugins/ItemTag.js index b825644..b90d88b 100644 --- a/src/main/resources/plugins/ItemTag.js +++ b/src/main/resources/plugins/ItemTag.js @@ -28,6 +28,8 @@ function load() { function enable() { switch (DetectServerType) { case ServerType.Bukkit: + var i = require('api/item').create('STONE') + if (!i.setCustomName) { return } event.on(self, 'ItemMergeEvent', function(event) { bukkit(event.target, event.entity.itemStack.amount + event.target.itemStack.amount); });