Fix Saving with No NPC

This commit is contained in:
Kam committed 2023-11-08 22:38:45 -05:00
1 parent 2dade38396
commit 158245fb5f
5 files changed
+19 -3

No files matched your search

@@ -21,6 +21,7 @@ public class GuiNpcMenu implements GuiYesNoCallback{
private int activeMenu;
private EntityNPCInterface npc;
public boolean saveNPC = true;
public GuiNpcMenu(GuiScreen parent, int activeMenu, EntityNPCInterface npc) {
this.parent = parent;
@@ -109,7 +110,8 @@ public class GuiNpcMenu implements GuiYesNoCallback{
((GuiNPCInterface2)parent).close();
if(npc != null){
npc.reset();
Client.sendData(EnumPacketServer.NpcMenuClose);
if(saveNPC)
Client.sendData(EnumPacketServer.NpcMenuClose);
}
}