mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 15:27:29 +00:00
Merge branch 'api-changes' into dev
This commit is contained in:
commit
beb556f827
5 files changed
+101
-21
No files matched your search
@@ -1258,6 +1258,12 @@ public class PacketHandlerServer{
|
||||
player.addChatMessage(new ChatComponentText("Failed to create an entity out of your clone"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (entity instanceof EntityNPCInterface && !ConfigScript.canScript(player, CustomNpcsPermissions.SCRIPT)) {
|
||||
EntityNPCInterface npc = (EntityNPCInterface) entity;
|
||||
npc.script.setEnabled(false);
|
||||
}
|
||||
|
||||
if(ConfigDebug.PlayerLogging && FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER){
|
||||
LogWriter.script(String.format("[%s] (Player) %s SPAWNED ENTITY %s", "CLONER", player.getCommandSenderName(), entity));
|
||||
}
|
||||
@@ -1272,6 +1278,11 @@ public class PacketHandlerServer{
|
||||
compound = ServerCloneController.Instance.getCloneData(player, Server.readString(buffer), buffer.readInt());
|
||||
else
|
||||
compound = Server.readNBT(buffer);
|
||||
|
||||
if (!ConfigScript.canScript(player, CustomNpcsPermissions.SCRIPT)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(compound != null)
|
||||
NoppesUtilServer.createMobSpawner(x, y, z, compound, player);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user