From 6c626c8d545973b36ef7b4f5467eeb14db8790b2 Mon Sep 17 00:00:00 2001 From: Zoey76 <zoey_76@msn.com> Date: Sun, 29 Mar 2015 19:10:51 -0300 Subject: [PATCH] Minor update --- .../admincommandhandlers/AdminMammon.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/L2J_DataPack/dist/game/data/scripts/handlers/admincommandhandlers/AdminMammon.java b/L2J_DataPack/dist/game/data/scripts/handlers/admincommandhandlers/AdminMammon.java index 616affeaef..1890353ca1 100644 --- a/L2J_DataPack/dist/game/data/scripts/handlers/admincommandhandlers/AdminMammon.java +++ b/L2J_DataPack/dist/game/data/scripts/handlers/admincommandhandlers/AdminMammon.java @@ -70,14 +70,13 @@ public class AdminMammon implements IAdminCommandHandler if (blackSpawnInst != null) { - final L2Npc[] blackInst = blackSpawnInst.getNPCInstanceList(); - if (blackInst.length > 0) + final L2Npc blackInst = blackSpawnInst.getNPCInstanceList().peek(); + if (blackInst != null) { - final int x1 = blackInst[0].getX(), y1 = blackInst[0].getY(), z1 = blackInst[0].getZ(); - activeChar.sendMessage("Blacksmith of Mammon: " + x1 + " " + y1 + " " + z1); + activeChar.sendMessage("Blacksmith of Mammon: " + blackInst.getX() + " " + blackInst.getY() + " " + blackInst.getZ()); if (teleportIndex == 1) { - activeChar.teleToLocation(blackInst[0].getLocation(), true); + activeChar.teleToLocation(blackInst.getLocation(), true); } } } @@ -88,14 +87,13 @@ public class AdminMammon implements IAdminCommandHandler if (merchSpawnInst != null) { - final L2Npc[] merchInst = merchSpawnInst.getNPCInstanceList(); - if (merchInst.length > 0) + final L2Npc merchInst = merchSpawnInst.getNPCInstanceList().peek(); + if (merchInst != null) { - final int x2 = merchInst[0].getX(), y2 = merchInst[0].getY(), z2 = merchInst[0].getZ(); - activeChar.sendMessage("Merchant of Mammon: " + x2 + " " + y2 + " " + z2); + activeChar.sendMessage("Merchant of Mammon: " + merchInst.getX() + " " + merchInst.getY() + " " + merchInst.getZ()); if (teleportIndex == 2) { - activeChar.teleToLocation(merchInst[0].getLocation(), true); + activeChar.teleToLocation(merchInst.getLocation(), true); } } } -- GitLab