Revert "ScriptLogIgnoreType & PlayerLogging"

This reverts commit ac39e0a6d0.
This commit is contained in:
KAMKEEL committed 2022-11-07 01:43:27 -05:00
1 parent 361d210d1a
commit fe4cc719d4
3 files changed
-64

No files matched your search

@@ -196,9 +196,6 @@ public class PacketHandlerServer{
npc.script.readFromNBT(Server.readNBT(buffer));
npc.updateAI = true;
npc.script.hasInited = false;
if(CustomNpcs.PlayerLogging && FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER){
LogWriter.script(String.format("[%s] %s SAVED NPC %s (%s, %s, %s) [%s]", "SCRIPTER", player.getCommandSenderName(), npc.display.getName(), (int)npc.posX, (int)(npc).posY, (int)npc.posZ, npc.worldObj.getWorldInfo().getWorldName()));
}
}
else if(type == EnumPacketServer.ScriptDataGet){
NBTTagCompound compound = npc.script.writeToNBT(new NBTTagCompound());
@@ -371,9 +368,6 @@ public class PacketHandlerServer{
private void wandPackets(EnumPacketServer type, ByteBuf buffer, EntityPlayerMP player, EntityNPCInterface npc) throws IOException{
if(type == EnumPacketServer.Delete){
if(CustomNpcs.PlayerLogging && FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER){
LogWriter.script(String.format("[%s] %s DELETE NPC %s (%s, %s, %s) [%s]", "WAND", player.getCommandSenderName(), npc.display.getName(), (int)npc.posX, (int)npc.posY, (int)npc.posZ, npc.worldObj.getWorldInfo().getWorldName()));
}
npc.delete();
NoppesUtilServer.deleteNpc(npc,player);
}
@@ -409,9 +403,6 @@ public class PacketHandlerServer{
npc.reset();
if(npc.linkedData != null)
LinkedNpcController.Instance.saveNpcData(npc);
if(CustomNpcs.PlayerLogging && FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER){
LogWriter.script(String.format("[%s] %s CLOSE NPC %s (%s, %s, %s) [%s]", "WAND", player.getCommandSenderName(), npc.display.getName(), (int)npc.posX, (int)npc.posY, (int)npc.posZ, npc.worldObj.getWorldInfo().getWorldName()));
}
NoppesUtilServer.setEditingNpc(player, null);
}
else if(type == EnumPacketServer.BanksGet){
@@ -438,18 +429,12 @@ public class PacketHandlerServer{
if(entity == null || !(entity instanceof EntityNPCInterface))
return;
NoppesUtilServer.sendOpenGui(player, EnumGuiType.MainMenuDisplay, (EntityNPCInterface) entity);
if(CustomNpcs.PlayerLogging && FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER){
LogWriter.script(String.format("[%s] %s OPEN NPC %s (%s, %s, %s) [%s]", "WAND", player.getCommandSenderName(), ((EntityNPCInterface)entity).display.getName(), entity.posX, entity.posY, entity.posZ, entity.worldObj.getWorldInfo().getWorldName()));
}
}
else if(type == EnumPacketServer.RemoteDelete){
Entity entity = player.worldObj.getEntityByID(buffer.readInt());
if(entity == null || !(entity instanceof EntityNPCInterface))
return;
npc = (EntityNPCInterface) entity;
if(CustomNpcs.PlayerLogging && FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER){
LogWriter.script(String.format("[%s] %s DELETE NPC %s (%s, %s, %s) [%s]", "WAND", player.getCommandSenderName(), npc.display.getName(), (int)npc.posX, (int)npc.posY, (int)npc.posZ, npc.worldObj.getWorldInfo().getWorldName()));
}
npc.delete();
NoppesUtilServer.deleteNpc(npc,player);
NoppesUtilServer.sendNearbyNpcs(player);
@@ -877,9 +862,6 @@ public class PacketHandlerServer{
player.addChatMessage(new ChatComponentText("Failed to create an entity out of your clone"));
return;
}
if(CustomNpcs.PlayerLogging && FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER){
LogWriter.script(String.format("[%s] %s SPAWNED ENTITY %s", "CLONER", player.getCommandSenderName(), entity));
}
}
else if(type == EnumPacketServer.MobSpawner){
boolean server = buffer.readBoolean();