mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 05:15:11 +00:00
Fix Job Spawner not Removing Spawns
This commit is contained in:
1 parent
8e41a0973e
commit
339874da52
2 files changed
+6
-1
No files matched your search
@@ -879,6 +879,9 @@ public class PacketHandlerServer{
|
||||
else if(type == EnumPacketServer.JobSpawnerRemove){
|
||||
if(npc.advanced.job != EnumJobType.Spawner)
|
||||
return;
|
||||
JobSpawner job = (JobSpawner) npc.jobInterface;
|
||||
job.setJobCompound(buffer.readInt(), null);
|
||||
Server.sendData(player, EnumPacketClient.GUI_DATA, job.getTitles());
|
||||
}
|
||||
else if(type == EnumPacketServer.RoleSave){
|
||||
npc.roleInterface.readFromNBT(Server.readNBT(buffer));
|
||||
|
||||
@@ -102,7 +102,8 @@ public class GuiNpcSpawner extends GuiNPCInterface2 implements ITextfieldListene
|
||||
setSubGui(new GuiNpcMobSpawnerSelector());
|
||||
}
|
||||
if(button.id >= 20 && button.id < 26){
|
||||
job.setJobCompound(button.id - 19, null);
|
||||
int removeID = button.id - 19;
|
||||
job.setJobCompound(removeID, null);
|
||||
Client.sendData(EnumPacketServer.JobSpawnerRemove, button.id - 19);
|
||||
}
|
||||
if(button.id == 26){
|
||||
@@ -152,6 +153,7 @@ public class GuiNpcSpawner extends GuiNPCInterface2 implements ITextfieldListene
|
||||
if(textfield.id == 9){
|
||||
job.zOffset = textfield.getInteger();
|
||||
}
|
||||
save();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user