mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
ScriptCustomItem:
-Fixed issue where NBT data was not being sent to the client side, caused by latest commit.
This commit is contained in:
1 parent
7c4965d368
commit
1ce5b7b302
5 files changed
+9
-12
No files matched your search
@@ -19,7 +19,6 @@ public class ScriptCustomItem extends ScriptItemStack implements IItemCustom, IS
|
||||
public List<Integer> errored = new ArrayList();
|
||||
public String scriptLanguage = "ECMAScript";
|
||||
public boolean enabled = false;
|
||||
public long lastInited = -1L;
|
||||
public boolean loaded = false;
|
||||
|
||||
public boolean durabilityShow = false;
|
||||
@@ -47,7 +46,6 @@ public class ScriptCustomItem extends ScriptItemStack implements IItemCustom, IS
|
||||
|
||||
public ScriptCustomItem(ItemStack item) {
|
||||
super(item);
|
||||
loadScriptData();
|
||||
loadItemData();
|
||||
}
|
||||
|
||||
@@ -74,16 +72,12 @@ public class ScriptCustomItem extends ScriptItemStack implements IItemCustom, IS
|
||||
if (!this.loaded) {
|
||||
this.loadScriptData();
|
||||
this.loaded = true;
|
||||
if (type != EnumScriptType.INIT) {
|
||||
EventHooks.onScriptItemInit(this);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.isEnabled()) {
|
||||
if (ScriptController.Instance.lastLoaded > this.lastInited) {
|
||||
this.lastInited = ScriptController.Instance.lastLoaded;
|
||||
if (type != EnumScriptType.INIT) {
|
||||
EventHooks.onScriptItemInit(this);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < this.scripts.size(); i++) {
|
||||
ScriptContainer script = this.scripts.get(i);
|
||||
if (!this.errored.contains(i)) {
|
||||
|
||||
Reference in new issue
Block a user