mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 00:22:19 +00:00
More fixes to global NPC scripts not executing on servers, and added more functions to IEntityLivingBase.
This commit is contained in:
1 parent
8d52e9356c
commit
699b24e467
6 files changed
+51
-21
No files matched your search
@@ -25,7 +25,6 @@ public class NPCDataScript implements IScriptHandler {
|
||||
public long lastInited = -1L;
|
||||
public boolean enabled = false;
|
||||
private Map<Long, String> console = new TreeMap();
|
||||
public List<Integer> errored = new ArrayList();
|
||||
|
||||
public NPCDataScript(EntityNPCInterface npc) {
|
||||
if(npc != null) {
|
||||
@@ -34,7 +33,6 @@ public class NPCDataScript implements IScriptHandler {
|
||||
}
|
||||
public void clear() {
|
||||
this.console = new TreeMap();
|
||||
this.errored = new ArrayList();
|
||||
this.scripts = new ArrayList();
|
||||
}
|
||||
public void readFromNBT(NBTTagCompound compound) {
|
||||
@@ -71,20 +69,19 @@ public class NPCDataScript implements IScriptHandler {
|
||||
}
|
||||
|
||||
public boolean isEnabled() {
|
||||
return CustomNpcs.GlobalNPCScripts && ScriptController.Instance.npcScripts.enabled && ScriptController.HasStart && (this.npc == null || !this.npc.worldObj.isRemote);
|
||||
return CustomNpcs.GlobalNPCScripts && this.enabled && ScriptController.HasStart && this.scripts.size() > 0;
|
||||
}
|
||||
public boolean isClient() {
|
||||
return this.npc.isClientWorld();
|
||||
}
|
||||
public boolean getEnabled() {
|
||||
return ScriptController.Instance.npcScripts.enabled;
|
||||
return this.enabled;
|
||||
}
|
||||
public void setEnabled(boolean bo) {
|
||||
ScriptController.Instance.npcScripts.enabled = bo;
|
||||
this.enabled = bo;
|
||||
}
|
||||
public String getLanguage() {
|
||||
return ScriptController.Instance.npcScripts.scriptLanguage;
|
||||
return this.scriptLanguage;
|
||||
}
|
||||
public void setLanguage(String lang) {
|
||||
this.scriptLanguage = lang;
|
||||
|
||||
Reference in new issue
Block a user