Dialog packet needs NPC

This commit is contained in:
somehussar committed 2025-02-03 04:19:20 +01:00
1 parent ea1f5b259d
commit 54a07ffb48
1 file changed
+5 -3
@@ -25,6 +25,11 @@ public class DialogSelectPacket extends AbstractPacket {
this.optionID = optionID;
}
@Override
public boolean needsNPC() {
return true;
}
@Override
public Enum getType() {
return EnumPlayerPacket.DialogSelect;
@@ -46,9 +51,6 @@ public class DialogSelectPacket extends AbstractPacket {
if (!(player instanceof EntityPlayerMP))
return;
EntityPlayerMP playerMP = (EntityPlayerMP) player;
EntityNPCInterface npc = NoppesUtilServer.getEditingNpc(playerMP);
if(npc == null)
return;
NoppesUtilPlayer.dialogSelected(in.readInt(), in.readInt(), playerMP, npc);
}
}