mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 22:15:06 +00:00
ScriptingEnabled Fix
This commit is contained in:
1 parent
336e3c2663
commit
e6dbfaa4f5
2 files changed
+4
-3
No files matched your search
@@ -176,7 +176,7 @@ public class PacketHandlerServer{
|
||||
private void getScriptsEnabled(EnumPacketServer type, ByteBuf buffer, EntityPlayerMP player) throws IOException {
|
||||
if (type == EnumPacketServer.ScriptGlobalGuiDataGet) {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
compound.setBoolean("ScriptsEnabled", CustomNpcs.GlobalPlayerScripts);
|
||||
compound.setBoolean("ScriptsEnabled", CustomNpcs.ScriptingEnabled);
|
||||
compound.setBoolean("PlayerScriptsEnabled", CustomNpcs.GlobalPlayerScripts);
|
||||
compound.setBoolean("GlobalNPCScriptsEnabled", CustomNpcs.GlobalNPCScripts);
|
||||
compound.setBoolean("ForgeScriptsEnabled", CustomNpcs.GlobalForgeScripts);
|
||||
@@ -184,7 +184,7 @@ public class PacketHandlerServer{
|
||||
}
|
||||
else if (type == EnumPacketServer.ScriptGlobalGuiDataSave) {
|
||||
NBTTagCompound compound = Server.readNBT(buffer);
|
||||
CustomNpcs.GlobalPlayerScripts = compound.getBoolean("ScriptsEnabled");
|
||||
CustomNpcs.ScriptingEnabled = compound.getBoolean("ScriptsEnabled");
|
||||
CustomNpcs.GlobalPlayerScripts = compound.getBoolean("PlayerScriptsEnabled");
|
||||
CustomNpcs.GlobalNPCScripts = compound.getBoolean("GlobalNPCScriptsEnabled");
|
||||
CustomNpcs.GlobalForgeScripts = compound.getBoolean("ForgeScriptsEnabled");
|
||||
|
||||
@@ -10,6 +10,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.EventHooks;
|
||||
import noppes.npcs.constants.EnumScriptType;
|
||||
import noppes.npcs.controllers.ScriptContainer;
|
||||
@@ -158,7 +159,7 @@ public class DataScript implements IScriptHandler {
|
||||
}
|
||||
|
||||
public boolean isEnabled(){
|
||||
return enabled && ScriptController.HasStart && !npc.worldObj.isRemote && !scripts.isEmpty();
|
||||
return enabled && ScriptController.HasStart && !npc.worldObj.isRemote && !scripts.isEmpty() && CustomNpcs.ScriptingEnabled;
|
||||
}
|
||||
|
||||
public Map<Long, String> getConsoleText() {
|
||||
|
||||
Reference in new issue
Block a user