Clean up code & Upgrade syntax to new Java

This commit is contained in:
Đạt Nhân Trương
2022-08-07 01:35:02 +07:00
parent bbdf236a10
commit f983b4dccf
17 changed files with 44 additions and 61 deletions

View File

@@ -87,8 +87,7 @@ public final class NPCTalkHandler extends AbstractPacketHandler {
}
}
}
} else if (obj instanceof PlayerNPC) {
PlayerNPC pnpc = (PlayerNPC) obj;
} else if (obj instanceof PlayerNPC pnpc) {
NPCScriptManager nsm = NPCScriptManager.getInstance();
if (pnpc.getScriptId() < NpcId.CUSTOM_DEV && !nsm.isNpcScriptAvailable(c, "" + pnpc.getScriptId())) {