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

@@ -47,8 +47,7 @@ public final class HiredMerchantRequest extends AbstractPacketHandler {
try {
for (MapObject mmo : chr.getMap().getMapObjectsInRange(chr.getPosition(), 23000, Arrays.asList(MapObjectType.HIRED_MERCHANT, MapObjectType.PLAYER))) {
if (mmo instanceof Character) {
Character mc = (Character) mmo;
if (mmo instanceof Character mc) {
PlayerShop shop = mc.getPlayerShop();
if (shop != null && shop.isOwner(mc)) {