diff --git a/src/main/java/client/command/Command.java b/src/main/java/client/command/Command.java index 6fd6080be9..5c2ff02533 100644 --- a/src/main/java/client/command/Command.java +++ b/src/main/java/client/command/Command.java @@ -30,7 +30,7 @@ public abstract class Command { protected int rank; protected String description; - public abstract void execute(Client client, String[] params); + public abstract void execute(Client client, String[] params, CommandContext ctx); public String getDescription() { return description; diff --git a/src/main/java/client/command/CommandsExecutor.java b/src/main/java/client/command/CommandsExecutor.java index 2920c38e8e..175aac325b 100644 --- a/src/main/java/client/command/CommandsExecutor.java +++ b/src/main/java/client/command/CommandsExecutor.java @@ -121,7 +121,7 @@ public class CommandsExecutor { params = new String[]{}; } - command.execute(client, params); + command.execute(client, params, commandContext); log.info("Chr {} used command {}", client.getPlayer().getName(), command.getClass().getSimpleName()); } diff --git a/src/main/java/client/command/commands/gm0/BuyBackCommand.java b/src/main/java/client/command/commands/gm0/BuyBackCommand.java index 00d0a94521..4f57949353 100644 --- a/src/main/java/client/command/commands/gm0/BuyBackCommand.java +++ b/src/main/java/client/command/commands/gm0/BuyBackCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm0; import client.Client; import client.command.Command; +import client.command.CommandContext; import client.processor.action.BuybackProcessor; public class BuyBackCommand extends Command { @@ -33,7 +34,7 @@ public class BuyBackCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { if (params.length < 1) { c.getPlayer().yellowMessage("Syntax: @buyback "); return; diff --git a/src/main/java/client/command/commands/gm0/ChangeLanguageCommand.java b/src/main/java/client/command/commands/gm0/ChangeLanguageCommand.java index d953d4c11a..c5c2e73c98 100644 --- a/src/main/java/client/command/commands/gm0/ChangeLanguageCommand.java +++ b/src/main/java/client/command/commands/gm0/ChangeLanguageCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm0; import client.Client; import client.command.Command; +import client.command.CommandContext; public class ChangeLanguageCommand extends Command { { @@ -32,7 +33,7 @@ public class ChangeLanguageCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { if (params.length < 1) { c.getPlayer().yellowMessage("Syntax: !changel <0=ptb, 1=esp, 2=eng>"); return; diff --git a/src/main/java/client/command/commands/gm0/DisposeCommand.java b/src/main/java/client/command/commands/gm0/DisposeCommand.java index c5f3543deb..ec5020a08f 100644 --- a/src/main/java/client/command/commands/gm0/DisposeCommand.java +++ b/src/main/java/client/command/commands/gm0/DisposeCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm0; import client.Client; import client.command.Command; +import client.command.CommandContext; import scripting.npc.NPCScriptManager; import scripting.quest.QuestScriptManager; import tools.PacketCreator; @@ -35,7 +36,7 @@ public class DisposeCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { NPCScriptManager.getInstance().dispose(c); QuestScriptManager.getInstance().dispose(c); c.sendPacket(PacketCreator.enableActions()); diff --git a/src/main/java/client/command/commands/gm0/DropLimitCommand.java b/src/main/java/client/command/commands/gm0/DropLimitCommand.java index 5792d47bdb..d4f33ed35a 100644 --- a/src/main/java/client/command/commands/gm0/DropLimitCommand.java +++ b/src/main/java/client/command/commands/gm0/DropLimitCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm0; import client.Client; import client.command.Command; +import client.command.CommandContext; import config.YamlConfig; public class DropLimitCommand extends Command { @@ -33,7 +34,7 @@ public class DropLimitCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { int dropCount = c.getPlayer().getMap().getDroppedItemCount(); if (((float) dropCount) / YamlConfig.config.server.ITEM_LIMIT_ON_MAP < 0.75f) { c.getPlayer().showHint("Current drop count: #b" + dropCount + "#k / #e" + YamlConfig.config.server.ITEM_LIMIT_ON_MAP + "#n", 300); diff --git a/src/main/java/client/command/commands/gm0/EnableAuthCommand.java b/src/main/java/client/command/commands/gm0/EnableAuthCommand.java index 5ce7e71692..25bcad49c4 100644 --- a/src/main/java/client/command/commands/gm0/EnableAuthCommand.java +++ b/src/main/java/client/command/commands/gm0/EnableAuthCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm0; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.coordinator.login.LoginBypassCoordinator; public class EnableAuthCommand extends Command { @@ -33,7 +34,7 @@ public class EnableAuthCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { if (c.tryacquireClient()) { try { LoginBypassCoordinator.getInstance().unregisterLoginBypassEntry(c.getHwid(), c.getAccID()); diff --git a/src/main/java/client/command/commands/gm0/EquipLvCommand.java b/src/main/java/client/command/commands/gm0/EquipLvCommand.java index beafd307df..238ac3277f 100644 --- a/src/main/java/client/command/commands/gm0/EquipLvCommand.java +++ b/src/main/java/client/command/commands/gm0/EquipLvCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm0; import client.Client; import client.command.Command; +import client.command.CommandContext; public class EquipLvCommand extends Command { { @@ -32,7 +33,7 @@ public class EquipLvCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { c.getPlayer().showAllEquipFeatures(); } } diff --git a/src/main/java/client/command/commands/gm0/GachaCommand.java b/src/main/java/client/command/commands/gm0/GachaCommand.java index 86cf37f552..d3292ce1b6 100644 --- a/src/main/java/client/command/commands/gm0/GachaCommand.java +++ b/src/main/java/client/command/commands/gm0/GachaCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm0; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.NpcId; import server.ItemInformationProvider; import server.gachapon.Gachapon; @@ -35,7 +36,7 @@ public class GachaCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Gachapon.GachaponType gacha = null; String search = c.getPlayer().getLastCommandMessage(); String gachaName = ""; diff --git a/src/main/java/client/command/commands/gm0/GmCommand.java b/src/main/java/client/command/commands/gm0/GmCommand.java index 5d24133717..32b881ebbf 100644 --- a/src/main/java/client/command/commands/gm0/GmCommand.java +++ b/src/main/java/client/command/commands/gm0/GmCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm0; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,7 +41,7 @@ public class GmCommand extends Command { private static final Logger log = LoggerFactory.getLogger(GmCommand.class); @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { String[] tips = { "Please only use @gm in emergencies or to report somebody.", "To report a bug or make a suggestion, use the forum.", diff --git a/src/main/java/client/command/commands/gm0/HelpCommand.java b/src/main/java/client/command/commands/gm0/HelpCommand.java index b8f94e50c8..b0b742de23 100644 --- a/src/main/java/client/command/commands/gm0/HelpCommand.java +++ b/src/main/java/client/command/commands/gm0/HelpCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm0; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.NpcId; public class HelpCommand extends Command { @@ -33,7 +34,7 @@ public class HelpCommand extends Command { } @Override - public void execute(Client client, String[] params) { + public void execute(Client client, String[] params, CommandContext ctx) { client.getAbstractPlayerInteraction().openNpc(NpcId.STEWARD, "commands"); } } diff --git a/src/main/java/client/command/commands/gm0/JoinEventCommand.java b/src/main/java/client/command/commands/gm0/JoinEventCommand.java index 5459d70919..1efcea57da 100644 --- a/src/main/java/client/command/commands/gm0/JoinEventCommand.java +++ b/src/main/java/client/command/commands/gm0/JoinEventCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm0; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.MapId; import server.events.gm.Event; import server.maps.FieldLimit; @@ -36,7 +37,7 @@ public class JoinEventCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (!FieldLimit.CANNOTMIGRATE.check(player.getMap().getFieldLimit())) { Event event = c.getChannelServer().getEvent(); diff --git a/src/main/java/client/command/commands/gm0/LeaveEventCommand.java b/src/main/java/client/command/commands/gm0/LeaveEventCommand.java index 496b3917b2..44568bc02c 100644 --- a/src/main/java/client/command/commands/gm0/LeaveEventCommand.java +++ b/src/main/java/client/command/commands/gm0/LeaveEventCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm0; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class LeaveEventCommand extends Command { { @@ -33,7 +34,7 @@ public class LeaveEventCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); int returnMap = player.getSavedLocation("EVENT"); if (returnMap != -1) { diff --git a/src/main/java/client/command/commands/gm0/MapOwnerClaimCommand.java b/src/main/java/client/command/commands/gm0/MapOwnerClaimCommand.java index 8ff939a21a..cf4fffbc0d 100644 --- a/src/main/java/client/command/commands/gm0/MapOwnerClaimCommand.java +++ b/src/main/java/client/command/commands/gm0/MapOwnerClaimCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm0; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import config.YamlConfig; import server.maps.MapleMap; @@ -35,7 +36,7 @@ public class MapOwnerClaimCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { if (c.tryacquireClient()) { try { Character chr = c.getPlayer(); diff --git a/src/main/java/client/command/commands/gm0/OnlineCommand.java b/src/main/java/client/command/commands/gm0/OnlineCommand.java index 1b9a2f7e10..d89e909325 100644 --- a/src/main/java/client/command/commands/gm0/OnlineCommand.java +++ b/src/main/java/client/command/commands/gm0/OnlineCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm0; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import net.server.channel.Channel; @@ -35,7 +36,7 @@ public class OnlineCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); for (Channel ch : Server.getInstance().getChannelsFromWorld(player.getWorld())) { player.yellowMessage("Players in Channel " + ch.getId() + ":"); diff --git a/src/main/java/client/command/commands/gm0/RanksCommand.java b/src/main/java/client/command/commands/gm0/RanksCommand.java index 3fc1857205..b4650470f6 100644 --- a/src/main/java/client/command/commands/gm0/RanksCommand.java +++ b/src/main/java/client/command/commands/gm0/RanksCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm0; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.NpcId; import net.server.Server; import net.server.guild.GuildPackets; @@ -39,7 +40,7 @@ public class RanksCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); List> worldRanking = Server.getInstance().getWorldPlayerRanking(player.getWorld()); diff --git a/src/main/java/client/command/commands/gm0/RatesCommand.java b/src/main/java/client/command/commands/gm0/RatesCommand.java index 95181d6dcf..5f8c486ebb 100644 --- a/src/main/java/client/command/commands/gm0/RatesCommand.java +++ b/src/main/java/client/command/commands/gm0/RatesCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm0; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import config.YamlConfig; public class RatesCommand extends Command { @@ -34,7 +35,7 @@ public class RatesCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); // travel rates not applicable since it's intrinsically a server/environment rate rather than a character rate diff --git a/src/main/java/client/command/commands/gm0/ReadPointsCommand.java b/src/main/java/client/command/commands/gm0/ReadPointsCommand.java index e71afb2269..e12ff77123 100644 --- a/src/main/java/client/command/commands/gm0/ReadPointsCommand.java +++ b/src/main/java/client/command/commands/gm0/ReadPointsCommand.java @@ -3,6 +3,7 @@ package client.command.commands.gm0; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class ReadPointsCommand extends Command { { @@ -10,7 +11,7 @@ public class ReadPointsCommand extends Command { } @Override - public void execute(Client client, String[] params) { + public void execute(Client client, String[] params, CommandContext ctx) { Character player = client.getPlayer(); if (params.length > 2) { @@ -35,4 +36,4 @@ public class ReadPointsCommand extends Command { break; } } -} \ No newline at end of file +} diff --git a/src/main/java/client/command/commands/gm0/ReportBugCommand.java b/src/main/java/client/command/commands/gm0/ReportBugCommand.java index 53e35013db..0914750628 100644 --- a/src/main/java/client/command/commands/gm0/ReportBugCommand.java +++ b/src/main/java/client/command/commands/gm0/ReportBugCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm0; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -39,7 +40,7 @@ public class ReportBugCommand extends Command { private static final Logger log = LoggerFactory.getLogger(ReportBugCommand.class); @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { diff --git a/src/main/java/client/command/commands/gm0/ShowRatesCommand.java b/src/main/java/client/command/commands/gm0/ShowRatesCommand.java index 3a14f49e0f..20dd12cc90 100644 --- a/src/main/java/client/command/commands/gm0/ShowRatesCommand.java +++ b/src/main/java/client/command/commands/gm0/ShowRatesCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm0; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import config.YamlConfig; public class ShowRatesCommand extends Command { @@ -34,7 +35,7 @@ public class ShowRatesCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); String showMsg = "#eEXP RATE#n" + "\r\n"; showMsg += "World EXP Rate: #k" + c.getWorldServer().getExpRate() + "x#k" + "\r\n"; diff --git a/src/main/java/client/command/commands/gm0/StaffCommand.java b/src/main/java/client/command/commands/gm0/StaffCommand.java index 3209342431..4fb57c92c4 100644 --- a/src/main/java/client/command/commands/gm0/StaffCommand.java +++ b/src/main/java/client/command/commands/gm0/StaffCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm0; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.NpcId; public class StaffCommand extends Command { @@ -33,7 +34,7 @@ public class StaffCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { c.getAbstractPlayerInteraction().openNpc(NpcId.HERACLE, "credits"); } } diff --git a/src/main/java/client/command/commands/gm0/StatDexCommand.java b/src/main/java/client/command/commands/gm0/StatDexCommand.java index 59660c1a9b..b2bb97cf30 100644 --- a/src/main/java/client/command/commands/gm0/StatDexCommand.java +++ b/src/main/java/client/command/commands/gm0/StatDexCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm0; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import config.YamlConfig; public class StatDexCommand extends Command { @@ -34,7 +35,7 @@ public class StatDexCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); int remainingAp = player.getRemainingAp(); diff --git a/src/main/java/client/command/commands/gm0/StatIntCommand.java b/src/main/java/client/command/commands/gm0/StatIntCommand.java index abfb761e71..42092e605e 100644 --- a/src/main/java/client/command/commands/gm0/StatIntCommand.java +++ b/src/main/java/client/command/commands/gm0/StatIntCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm0; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import config.YamlConfig; public class StatIntCommand extends Command { @@ -34,7 +35,7 @@ public class StatIntCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); int remainingAp = player.getRemainingAp(); diff --git a/src/main/java/client/command/commands/gm0/StatLukCommand.java b/src/main/java/client/command/commands/gm0/StatLukCommand.java index 20cab06e2d..308d7296e7 100644 --- a/src/main/java/client/command/commands/gm0/StatLukCommand.java +++ b/src/main/java/client/command/commands/gm0/StatLukCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm0; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import config.YamlConfig; public class StatLukCommand extends Command { @@ -34,7 +35,7 @@ public class StatLukCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); int remainingAp = player.getRemainingAp(); diff --git a/src/main/java/client/command/commands/gm0/StatStrCommand.java b/src/main/java/client/command/commands/gm0/StatStrCommand.java index 2c8b7eaf84..576a4102f5 100644 --- a/src/main/java/client/command/commands/gm0/StatStrCommand.java +++ b/src/main/java/client/command/commands/gm0/StatStrCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm0; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import config.YamlConfig; public class StatStrCommand extends Command { @@ -34,7 +35,7 @@ public class StatStrCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); int remainingAp = player.getRemainingAp(); int amount; diff --git a/src/main/java/client/command/commands/gm0/TimeCommand.java b/src/main/java/client/command/commands/gm0/TimeCommand.java index 22a3502ee9..e84b3527b8 100644 --- a/src/main/java/client/command/commands/gm0/TimeCommand.java +++ b/src/main/java/client/command/commands/gm0/TimeCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm0; import client.Client; import client.command.Command; +import client.command.CommandContext; import java.text.DateFormat; import java.text.SimpleDateFormat; @@ -37,7 +38,7 @@ public class TimeCommand extends Command { } @Override - public void execute(Client client, String[] params) { + public void execute(Client client, String[] params, CommandContext ctx) { DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); dateFormat.setTimeZone(TimeZone.getDefault()); client.getPlayer().yellowMessage("Cosmic Server Time: " + dateFormat.format(new Date())); diff --git a/src/main/java/client/command/commands/gm0/ToggleExpCommand.java b/src/main/java/client/command/commands/gm0/ToggleExpCommand.java index 42ff35c9db..0a48f84f27 100644 --- a/src/main/java/client/command/commands/gm0/ToggleExpCommand.java +++ b/src/main/java/client/command/commands/gm0/ToggleExpCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm0; import client.Client; import client.command.Command; +import client.command.CommandContext; public class ToggleExpCommand extends Command { { @@ -32,7 +33,7 @@ public class ToggleExpCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { if (c.tryacquireClient()) { try { c.getPlayer().toggleExpGain(); // Vcoc's idea diff --git a/src/main/java/client/command/commands/gm0/UptimeCommand.java b/src/main/java/client/command/commands/gm0/UptimeCommand.java index fd4a234c5c..1cca56388a 100644 --- a/src/main/java/client/command/commands/gm0/UptimeCommand.java +++ b/src/main/java/client/command/commands/gm0/UptimeCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm0; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import static java.util.concurrent.TimeUnit.*; @@ -35,7 +36,7 @@ public class UptimeCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { long milliseconds = System.currentTimeMillis() - Server.uptime; int seconds = (int) (milliseconds / SECONDS.toMillis(1)) % 60; int minutes = (int) ((milliseconds / MINUTES.toMillis(1)) % 60); diff --git a/src/main/java/client/command/commands/gm1/BossHpCommand.java b/src/main/java/client/command/commands/gm1/BossHpCommand.java index 4156cfd25c..779369f4cf 100644 --- a/src/main/java/client/command/commands/gm1/BossHpCommand.java +++ b/src/main/java/client/command/commands/gm1/BossHpCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm1; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.life.Monster; public class BossHpCommand extends Command { @@ -34,7 +35,7 @@ public class BossHpCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); for (Monster monster : player.getMap().getAllMonsters()) { if (monster != null && monster.isBoss() && monster.getHp() > 0) { diff --git a/src/main/java/client/command/commands/gm1/BuffMeCommand.java b/src/main/java/client/command/commands/gm1/BuffMeCommand.java index ce2afba245..fa69c50314 100644 --- a/src/main/java/client/command/commands/gm1/BuffMeCommand.java +++ b/src/main/java/client/command/commands/gm1/BuffMeCommand.java @@ -27,6 +27,7 @@ import client.Character; import client.Client; import client.SkillFactory; import client.command.Command; +import client.command.CommandContext; public class BuffMeCommand extends Command { { @@ -34,7 +35,7 @@ public class BuffMeCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); SkillFactory.getSkill(4101004).getEffect(SkillFactory.getSkill(4101004).getMaxLevel()).applyTo(player); SkillFactory.getSkill(2311003).getEffect(SkillFactory.getSkill(2311003).getMaxLevel()).applyTo(player); diff --git a/src/main/java/client/command/commands/gm1/GotoCommand.java b/src/main/java/client/command/commands/gm1/GotoCommand.java index c6e32e2e3d..d5077879a8 100644 --- a/src/main/java/client/command/commands/gm1/GotoCommand.java +++ b/src/main/java/client/command/commands/gm1/GotoCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm1; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.game.GameConstants; import constants.id.NpcId; import server.maps.*; @@ -73,7 +74,7 @@ public class GotoCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { String sendStr = "Syntax: #b@goto #k. Available areas:\r\n\r\n#rTowns:#k\r\n" + GOTO_TOWNS_INFO; diff --git a/src/main/java/client/command/commands/gm1/MobHpCommand.java b/src/main/java/client/command/commands/gm1/MobHpCommand.java index ee9310eada..8617bf88f2 100644 --- a/src/main/java/client/command/commands/gm1/MobHpCommand.java +++ b/src/main/java/client/command/commands/gm1/MobHpCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm1; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.life.Monster; public class MobHpCommand extends Command { @@ -34,7 +35,7 @@ public class MobHpCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); for (Monster monster : player.getMap().getAllMonsters()) { if (monster != null && monster.getHp() > 0) { diff --git a/src/main/java/client/command/commands/gm1/WhatDropsFromCommand.java b/src/main/java/client/command/commands/gm1/WhatDropsFromCommand.java index 111d5ce6ee..7772f17b8e 100644 --- a/src/main/java/client/command/commands/gm1/WhatDropsFromCommand.java +++ b/src/main/java/client/command/commands/gm1/WhatDropsFromCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm1; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.NpcId; import server.ItemInformationProvider; import server.life.MonsterDropEntry; @@ -40,7 +41,7 @@ public class WhatDropsFromCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.dropMessage(5, "Please do @whatdropsfrom "); @@ -56,7 +57,7 @@ public class WhatDropsFromCommand extends Command { int mobId = data.getLeft(); String mobName = data.getRight(); output += mobName + " drops the following items:\r\n\r\n"; - for (MonsterDropEntry drop : MonsterInformationProvider.getInstance().retrieveDrop(mobId)) { + for (MonsterDropEntry drop : ctx.dropProvider().getMonsterDropEntries(mobId)) { try { String name = ItemInformationProvider.getInstance().getName(drop.itemId); if (name == null || name.equals("null") || drop.chance == 0) { diff --git a/src/main/java/client/command/commands/gm1/WhoDropsCommand.java b/src/main/java/client/command/commands/gm1/WhoDropsCommand.java index 1c27c8c9b0..6ac3d0bdea 100644 --- a/src/main/java/client/command/commands/gm1/WhoDropsCommand.java +++ b/src/main/java/client/command/commands/gm1/WhoDropsCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm1; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.NpcId; import server.ItemInformationProvider; import server.life.MonsterInformationProvider; @@ -43,7 +44,7 @@ public class WhoDropsCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.dropMessage(5, "Please do @whodrops "); diff --git a/src/main/java/client/command/commands/gm2/ApCommand.java b/src/main/java/client/command/commands/gm2/ApCommand.java index 83068f8f01..a8096490f1 100644 --- a/src/main/java/client/command/commands/gm2/ApCommand.java +++ b/src/main/java/client/command/commands/gm2/ApCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import config.YamlConfig; public class ApCommand extends Command { @@ -34,7 +35,7 @@ public class ApCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !ap [] "); diff --git a/src/main/java/client/command/commands/gm2/BombCommand.java b/src/main/java/client/command/commands/gm2/BombCommand.java index aa609bfefb..c58dce8198 100644 --- a/src/main/java/client/command/commands/gm2/BombCommand.java +++ b/src/main/java/client/command/commands/gm2/BombCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.MobId; import net.server.Server; import server.life.LifeFactory; @@ -37,7 +38,7 @@ public class BombCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length > 0) { Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]); diff --git a/src/main/java/client/command/commands/gm2/BuffCommand.java b/src/main/java/client/command/commands/gm2/BuffCommand.java index a6033bb43c..e5c368e450 100644 --- a/src/main/java/client/command/commands/gm2/BuffCommand.java +++ b/src/main/java/client/command/commands/gm2/BuffCommand.java @@ -28,6 +28,7 @@ import client.Client; import client.Skill; import client.SkillFactory; import client.command.Command; +import client.command.CommandContext; public class BuffCommand extends Command { { @@ -35,7 +36,7 @@ public class BuffCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !buff "); diff --git a/src/main/java/client/command/commands/gm2/BuffMapCommand.java b/src/main/java/client/command/commands/gm2/BuffMapCommand.java index c1433d30c8..c5dd6cd19d 100644 --- a/src/main/java/client/command/commands/gm2/BuffMapCommand.java +++ b/src/main/java/client/command/commands/gm2/BuffMapCommand.java @@ -27,6 +27,7 @@ import client.Character; import client.Client; import client.SkillFactory; import client.command.Command; +import client.command.CommandContext; public class BuffMapCommand extends Command { { @@ -34,7 +35,7 @@ public class BuffMapCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); SkillFactory.getSkill(9101001).getEffect(SkillFactory.getSkill(9101001).getMaxLevel()).applyTo(player, true); SkillFactory.getSkill(9101002).getEffect(SkillFactory.getSkill(9101002).getMaxLevel()).applyTo(player, true); diff --git a/src/main/java/client/command/commands/gm2/ClearDropsCommand.java b/src/main/java/client/command/commands/gm2/ClearDropsCommand.java index 05c8e009fa..382c404ce9 100644 --- a/src/main/java/client/command/commands/gm2/ClearDropsCommand.java +++ b/src/main/java/client/command/commands/gm2/ClearDropsCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class ClearDropsCommand extends Command { { @@ -33,7 +34,7 @@ public class ClearDropsCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); player.getMap().clearDrops(player); player.dropMessage(5, "Cleared dropped items"); diff --git a/src/main/java/client/command/commands/gm2/ClearSavedLocationsCommand.java b/src/main/java/client/command/commands/gm2/ClearSavedLocationsCommand.java index 0a5a87bdcc..8f78e8c6a9 100644 --- a/src/main/java/client/command/commands/gm2/ClearSavedLocationsCommand.java +++ b/src/main/java/client/command/commands/gm2/ClearSavedLocationsCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.maps.SavedLocationType; public class ClearSavedLocationsCommand extends Command { @@ -34,7 +35,7 @@ public class ClearSavedLocationsCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(), victim; if (params.length > 0) { diff --git a/src/main/java/client/command/commands/gm2/ClearSlotCommand.java b/src/main/java/client/command/commands/gm2/ClearSlotCommand.java index 63f3135073..8625fa7200 100644 --- a/src/main/java/client/command/commands/gm2/ClearSlotCommand.java +++ b/src/main/java/client/command/commands/gm2/ClearSlotCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import client.inventory.InventoryType; import client.inventory.Item; import client.inventory.manipulator.InventoryManipulator; @@ -36,7 +37,7 @@ public class ClearSlotCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !clearslot "); diff --git a/src/main/java/client/command/commands/gm2/DcCommand.java b/src/main/java/client/command/commands/gm2/DcCommand.java index 1ae5f093d3..2b6e70f539 100644 --- a/src/main/java/client/command/commands/gm2/DcCommand.java +++ b/src/main/java/client/command/commands/gm2/DcCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class DcCommand extends Command { { @@ -33,7 +34,7 @@ public class DcCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !dc "); diff --git a/src/main/java/client/command/commands/gm2/EmpowerMeCommand.java b/src/main/java/client/command/commands/gm2/EmpowerMeCommand.java index 58c52b9b47..357dbe61bd 100644 --- a/src/main/java/client/command/commands/gm2/EmpowerMeCommand.java +++ b/src/main/java/client/command/commands/gm2/EmpowerMeCommand.java @@ -27,6 +27,7 @@ import client.Character; import client.Client; import client.SkillFactory; import client.command.Command; +import client.command.CommandContext; public class EmpowerMeCommand extends Command { { @@ -34,7 +35,7 @@ public class EmpowerMeCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); final int[] array = {2311003, 2301004, 1301007, 4101004, 2001002, 1101007, 1005, 2301003, 5121009, 1111002, 4111001, 4111002, 4211003, 4211005, 1321000, 2321004, 3121002}; for (int i : array) { diff --git a/src/main/java/client/command/commands/gm2/GachaListCommand.java b/src/main/java/client/command/commands/gm2/GachaListCommand.java index 805f550e53..54c45d095d 100644 --- a/src/main/java/client/command/commands/gm2/GachaListCommand.java +++ b/src/main/java/client/command/commands/gm2/GachaListCommand.java @@ -21,6 +21,7 @@ package client.command.commands.gm2; import client.Client; import client.command.Command; +import client.command.CommandContext; /** * @author Ronan @@ -31,7 +32,7 @@ public class GachaListCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { c.getAbstractPlayerInteraction().openNpc(10000, "gachaponInfo"); } } diff --git a/src/main/java/client/command/commands/gm2/GmShopCommand.java b/src/main/java/client/command/commands/gm2/GmShopCommand.java index ea286f3261..caebd8fdda 100644 --- a/src/main/java/client/command/commands/gm2/GmShopCommand.java +++ b/src/main/java/client/command/commands/gm2/GmShopCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm2; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.ShopFactory; public class GmShopCommand extends Command { @@ -33,7 +34,7 @@ public class GmShopCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { ShopFactory.getInstance().getShop(1337).sendShop(c); } } diff --git a/src/main/java/client/command/commands/gm2/HealCommand.java b/src/main/java/client/command/commands/gm2/HealCommand.java index 620c7ddf06..5f09030ec4 100644 --- a/src/main/java/client/command/commands/gm2/HealCommand.java +++ b/src/main/java/client/command/commands/gm2/HealCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class HealCommand extends Command { { @@ -33,7 +34,7 @@ public class HealCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); player.healHpMp(); } diff --git a/src/main/java/client/command/commands/gm2/HideCommand.java b/src/main/java/client/command/commands/gm2/HideCommand.java index 33a5f9b2c3..9f256f6d9f 100644 --- a/src/main/java/client/command/commands/gm2/HideCommand.java +++ b/src/main/java/client/command/commands/gm2/HideCommand.java @@ -27,6 +27,7 @@ import client.Character; import client.Client; import client.SkillFactory; import client.command.Command; +import client.command.CommandContext; public class HideCommand extends Command { { @@ -34,7 +35,7 @@ public class HideCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); SkillFactory.getSkill(9101004).getEffect(SkillFactory.getSkill(9101004).getMaxLevel()).applyTo(player); diff --git a/src/main/java/client/command/commands/gm2/IdCommand.java b/src/main/java/client/command/commands/gm2/IdCommand.java index c64466b68d..d79c7269c0 100644 --- a/src/main/java/client/command/commands/gm2/IdCommand.java +++ b/src/main/java/client/command/commands/gm2/IdCommand.java @@ -3,6 +3,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.game.NpcChat; import constants.id.NpcId; import server.ThreadManager; @@ -82,7 +83,7 @@ public class IdCommand extends Command { } @Override - public void execute(Client client, final String[] params) { + public void execute(Client client, final String[] params, CommandContext ctx) { final Character chr = client.getPlayer(); if (params.length < 2) { chr.yellowMessage("Syntax: !id "); diff --git a/src/main/java/client/command/commands/gm2/ItemCommand.java b/src/main/java/client/command/commands/gm2/ItemCommand.java index d74f47b1d2..92095ba19d 100644 --- a/src/main/java/client/command/commands/gm2/ItemCommand.java +++ b/src/main/java/client/command/commands/gm2/ItemCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import client.inventory.Pet; import client.inventory.manipulator.InventoryManipulator; import config.YamlConfig; @@ -40,7 +41,7 @@ public class ItemCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { diff --git a/src/main/java/client/command/commands/gm2/ItemDropCommand.java b/src/main/java/client/command/commands/gm2/ItemDropCommand.java index ff065c651f..5ce00ce4c4 100644 --- a/src/main/java/client/command/commands/gm2/ItemDropCommand.java +++ b/src/main/java/client/command/commands/gm2/ItemDropCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import client.inventory.InventoryType; import client.inventory.Item; import client.inventory.Pet; @@ -41,7 +42,7 @@ public class ItemDropCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { diff --git a/src/main/java/client/command/commands/gm2/JailCommand.java b/src/main/java/client/command/commands/gm2/JailCommand.java index 671199d1e3..2a1b98afa8 100644 --- a/src/main/java/client/command/commands/gm2/JailCommand.java +++ b/src/main/java/client/command/commands/gm2/JailCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.MapId; import server.maps.MapleMap; import server.maps.Portal; @@ -38,7 +39,7 @@ public class JailCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !jail []"); diff --git a/src/main/java/client/command/commands/gm2/JobCommand.java b/src/main/java/client/command/commands/gm2/JobCommand.java index c233499e40..e3c65ab70b 100644 --- a/src/main/java/client/command/commands/gm2/JobCommand.java +++ b/src/main/java/client/command/commands/gm2/JobCommand.java @@ -27,6 +27,7 @@ import client.Character; import client.Client; import client.Job; import client.command.Command; +import client.command.CommandContext; public class JobCommand extends Command { { @@ -34,7 +35,7 @@ public class JobCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length == 1) { int jobid = Integer.parseInt(params[0]); diff --git a/src/main/java/client/command/commands/gm2/LevelCommand.java b/src/main/java/client/command/commands/gm2/LevelCommand.java index b0846be4eb..a7812c1a53 100644 --- a/src/main/java/client/command/commands/gm2/LevelCommand.java +++ b/src/main/java/client/command/commands/gm2/LevelCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import config.YamlConfig; public class LevelCommand extends Command { @@ -34,7 +35,7 @@ public class LevelCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !level "); diff --git a/src/main/java/client/command/commands/gm2/LevelProCommand.java b/src/main/java/client/command/commands/gm2/LevelProCommand.java index 20afd63b50..1f3446c936 100644 --- a/src/main/java/client/command/commands/gm2/LevelProCommand.java +++ b/src/main/java/client/command/commands/gm2/LevelProCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class LevelProCommand extends Command { { @@ -33,7 +34,7 @@ public class LevelProCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !levelpro "); diff --git a/src/main/java/client/command/commands/gm2/LootCommand.java b/src/main/java/client/command/commands/gm2/LootCommand.java index 6ad115e34d..7cc6cf210a 100644 --- a/src/main/java/client/command/commands/gm2/LootCommand.java +++ b/src/main/java/client/command/commands/gm2/LootCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm2; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.maps.MapItem; import server.maps.MapObject; import server.maps.MapObjectType; @@ -39,7 +40,7 @@ public class LootCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { List items = c.getPlayer().getMap().getMapObjectsInRange(c.getPlayer().getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapObjectType.ITEM)); for (MapObject item : items) { MapItem mapItem = (MapItem) item; diff --git a/src/main/java/client/command/commands/gm2/MaxSkillCommand.java b/src/main/java/client/command/commands/gm2/MaxSkillCommand.java index a91cd89097..f191006c68 100644 --- a/src/main/java/client/command/commands/gm2/MaxSkillCommand.java +++ b/src/main/java/client/command/commands/gm2/MaxSkillCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.*; import client.command.Command; +import client.command.CommandContext; import provider.Data; import provider.DataProviderFactory; import provider.wz.WZFiles; @@ -36,7 +37,7 @@ public class MaxSkillCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); for (Data skill_ : DataProviderFactory.getDataProvider(WZFiles.STRING).getData("Skill.img").getChildren()) { try { diff --git a/src/main/java/client/command/commands/gm2/MaxStatCommand.java b/src/main/java/client/command/commands/gm2/MaxStatCommand.java index f3e7dd1c8b..464fb79b1c 100644 --- a/src/main/java/client/command/commands/gm2/MaxStatCommand.java +++ b/src/main/java/client/command/commands/gm2/MaxStatCommand.java @@ -27,6 +27,7 @@ import client.Character; import client.Client; import client.Stat; import client.command.Command; +import client.command.CommandContext; import config.YamlConfig; public class MaxStatCommand extends Command { @@ -35,7 +36,7 @@ public class MaxStatCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); player.loseExp(player.getExp(), false, false); player.setLevel(255); diff --git a/src/main/java/client/command/commands/gm2/MobSkillCommand.java b/src/main/java/client/command/commands/gm2/MobSkillCommand.java index d5adbdf0b3..60ace9f92a 100644 --- a/src/main/java/client/command/commands/gm2/MobSkillCommand.java +++ b/src/main/java/client/command/commands/gm2/MobSkillCommand.java @@ -3,6 +3,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.life.MobSkill; import server.life.MobSkillFactory; import server.life.MobSkillType; @@ -16,7 +17,7 @@ public class MobSkillCommand extends Command { } @Override - public void execute(Client client, String[] params) { + public void execute(Client client, String[] params, CommandContext ctx) { if (params.length < 2) { throw new IllegalArgumentException("Mob skill command requires two args: mob skill id and level"); } diff --git a/src/main/java/client/command/commands/gm2/ReachCommand.java b/src/main/java/client/command/commands/gm2/ReachCommand.java index 41b3bb3a6b..113889600d 100644 --- a/src/main/java/client/command/commands/gm2/ReachCommand.java +++ b/src/main/java/client/command/commands/gm2/ReachCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.maps.MapleMap; public class ReachCommand extends Command { @@ -34,7 +35,7 @@ public class ReachCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !reach "); diff --git a/src/main/java/client/command/commands/gm2/RechargeCommand.java b/src/main/java/client/command/commands/gm2/RechargeCommand.java index 3aaa23bb0e..c138f3a5c3 100644 --- a/src/main/java/client/command/commands/gm2/RechargeCommand.java +++ b/src/main/java/client/command/commands/gm2/RechargeCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import client.inventory.InventoryType; import client.inventory.Item; import constants.inventory.ItemConstants; @@ -37,7 +38,7 @@ public class RechargeCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); ItemInformationProvider ii = ItemInformationProvider.getInstance(); for (Item torecharge : c.getPlayer().getInventory(InventoryType.USE).list()) { diff --git a/src/main/java/client/command/commands/gm2/ResetSkillCommand.java b/src/main/java/client/command/commands/gm2/ResetSkillCommand.java index a1724f5d4a..688dc1abfe 100644 --- a/src/main/java/client/command/commands/gm2/ResetSkillCommand.java +++ b/src/main/java/client/command/commands/gm2/ResetSkillCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.*; import client.command.Command; +import client.command.CommandContext; import provider.Data; import provider.DataProviderFactory; import provider.wz.WZFiles; @@ -36,7 +37,7 @@ public class ResetSkillCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); for (Data skill_ : DataProviderFactory.getDataProvider(WZFiles.STRING).getData("Skill.img").getChildren()) { try { diff --git a/src/main/java/client/command/commands/gm2/SearchCommand.java b/src/main/java/client/command/commands/gm2/SearchCommand.java index 3ce506185d..9766be8924 100644 --- a/src/main/java/client/command/commands/gm2/SearchCommand.java +++ b/src/main/java/client/command/commands/gm2/SearchCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.NpcId; import provider.Data; import provider.DataProvider; @@ -53,7 +54,7 @@ public class SearchCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 2) { player.yellowMessage("Syntax: !search "); diff --git a/src/main/java/client/command/commands/gm2/SetSlotCommand.java b/src/main/java/client/command/commands/gm2/SetSlotCommand.java index fd8124e2de..dab5b1d8dc 100644 --- a/src/main/java/client/command/commands/gm2/SetSlotCommand.java +++ b/src/main/java/client/command/commands/gm2/SetSlotCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class SetSlotCommand extends Command { { @@ -33,7 +34,7 @@ public class SetSlotCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !setslot "); diff --git a/src/main/java/client/command/commands/gm2/SetStatCommand.java b/src/main/java/client/command/commands/gm2/SetStatCommand.java index 7eae82c123..360fe0bd01 100644 --- a/src/main/java/client/command/commands/gm2/SetStatCommand.java +++ b/src/main/java/client/command/commands/gm2/SetStatCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class SetStatCommand extends Command { { @@ -33,7 +34,7 @@ public class SetStatCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !setstat "); diff --git a/src/main/java/client/command/commands/gm2/SpCommand.java b/src/main/java/client/command/commands/gm2/SpCommand.java index f905c21a7a..c5dc98459b 100644 --- a/src/main/java/client/command/commands/gm2/SpCommand.java +++ b/src/main/java/client/command/commands/gm2/SpCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import config.YamlConfig; public class SpCommand extends Command { @@ -34,7 +35,7 @@ public class SpCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !sp [] "); diff --git a/src/main/java/client/command/commands/gm2/SummonCommand.java b/src/main/java/client/command/commands/gm2/SummonCommand.java index b159a176e1..058ca081e4 100644 --- a/src/main/java/client/command/commands/gm2/SummonCommand.java +++ b/src/main/java/client/command/commands/gm2/SummonCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import net.server.channel.Channel; import server.maps.MapleMap; @@ -36,7 +37,7 @@ public class SummonCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !warphere "); diff --git a/src/main/java/client/command/commands/gm2/UnBugCommand.java b/src/main/java/client/command/commands/gm2/UnBugCommand.java index fb175c540d..6863a191bc 100644 --- a/src/main/java/client/command/commands/gm2/UnBugCommand.java +++ b/src/main/java/client/command/commands/gm2/UnBugCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm2; import client.Client; import client.command.Command; +import client.command.CommandContext; import tools.PacketCreator; public class UnBugCommand extends Command { @@ -33,7 +34,7 @@ public class UnBugCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { c.getPlayer().getMap().broadcastMessage(PacketCreator.enableActions()); } } diff --git a/src/main/java/client/command/commands/gm2/UnHideCommand.java b/src/main/java/client/command/commands/gm2/UnHideCommand.java index 1e2cd29cef..e036907226 100644 --- a/src/main/java/client/command/commands/gm2/UnHideCommand.java +++ b/src/main/java/client/command/commands/gm2/UnHideCommand.java @@ -27,6 +27,7 @@ import client.Character; import client.Client; import client.SkillFactory; import client.command.Command; +import client.command.CommandContext; public class UnHideCommand extends Command { { @@ -34,7 +35,7 @@ public class UnHideCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); SkillFactory.getSkill(9101004).getEffect(SkillFactory.getSkill(9101004).getMaxLevel()).applyTo(player); diff --git a/src/main/java/client/command/commands/gm2/UnJailCommand.java b/src/main/java/client/command/commands/gm2/UnJailCommand.java index 41843f38e1..5e45dc9fef 100644 --- a/src/main/java/client/command/commands/gm2/UnJailCommand.java +++ b/src/main/java/client/command/commands/gm2/UnJailCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class UnJailCommand extends Command { { @@ -33,7 +34,7 @@ public class UnJailCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !unjail "); diff --git a/src/main/java/client/command/commands/gm2/WarpAreaCommand.java b/src/main/java/client/command/commands/gm2/WarpAreaCommand.java index 8d3d986e5f..3820b96353 100644 --- a/src/main/java/client/command/commands/gm2/WarpAreaCommand.java +++ b/src/main/java/client/command/commands/gm2/WarpAreaCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.maps.MapleMap; import java.awt.*; @@ -37,7 +38,7 @@ public class WarpAreaCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !warparea "); diff --git a/src/main/java/client/command/commands/gm2/WarpCommand.java b/src/main/java/client/command/commands/gm2/WarpCommand.java index 4f191a5196..4e238b90d7 100644 --- a/src/main/java/client/command/commands/gm2/WarpCommand.java +++ b/src/main/java/client/command/commands/gm2/WarpCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.maps.FieldLimit; import server.maps.MapleMap; import server.maps.MiniDungeonInfo; @@ -36,7 +37,7 @@ public class WarpCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !warp "); diff --git a/src/main/java/client/command/commands/gm2/WarpMapCommand.java b/src/main/java/client/command/commands/gm2/WarpMapCommand.java index 3e7c5ab5e1..d353f2b835 100644 --- a/src/main/java/client/command/commands/gm2/WarpMapCommand.java +++ b/src/main/java/client/command/commands/gm2/WarpMapCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.maps.MapleMap; import java.util.Collection; @@ -36,7 +37,7 @@ public class WarpMapCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !warpmap "); diff --git a/src/main/java/client/command/commands/gm2/WhereaMiCommand.java b/src/main/java/client/command/commands/gm2/WhereaMiCommand.java index b4ddc29d9f..7b4b56176e 100644 --- a/src/main/java/client/command/commands/gm2/WhereaMiCommand.java +++ b/src/main/java/client/command/commands/gm2/WhereaMiCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm2; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.life.Monster; import server.life.NPC; import server.life.PlayerNPC; @@ -39,7 +40,7 @@ public class WhereaMiCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); HashSet chars = new HashSet<>(); diff --git a/src/main/java/client/command/commands/gm3/BanCommand.java b/src/main/java/client/command/commands/gm3/BanCommand.java index f24ff3316b..5e00123889 100644 --- a/src/main/java/client/command/commands/gm3/BanCommand.java +++ b/src/main/java/client/command/commands/gm3/BanCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import server.TimerManager; import tools.DatabaseConnection; @@ -41,7 +42,7 @@ public class BanCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 2) { player.yellowMessage("Syntax: !ban (Please be descriptive)"); diff --git a/src/main/java/client/command/commands/gm3/ChatCommand.java b/src/main/java/client/command/commands/gm3/ChatCommand.java index 0ea9c36637..dc6e0041a4 100644 --- a/src/main/java/client/command/commands/gm3/ChatCommand.java +++ b/src/main/java/client/command/commands/gm3/ChatCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class ChatCommand extends Command { { @@ -33,7 +34,7 @@ public class ChatCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); player.toggleWhiteChat(); player.message("Your chat is now " + (player.getWhiteChat() ? " white" : "normal") + "."); diff --git a/src/main/java/client/command/commands/gm3/CheckDmgCommand.java b/src/main/java/client/command/commands/gm3/CheckDmgCommand.java index 82ffe11cd0..1aca8ea158 100644 --- a/src/main/java/client/command/commands/gm3/CheckDmgCommand.java +++ b/src/main/java/client/command/commands/gm3/CheckDmgCommand.java @@ -27,6 +27,7 @@ import client.BuffStat; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class CheckDmgCommand extends Command { { @@ -34,7 +35,7 @@ public class CheckDmgCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]); if (victim != null) { diff --git a/src/main/java/client/command/commands/gm3/ClosePortalCommand.java b/src/main/java/client/command/commands/gm3/ClosePortalCommand.java index 32f55c53c3..9e4a8889e8 100644 --- a/src/main/java/client/command/commands/gm3/ClosePortalCommand.java +++ b/src/main/java/client/command/commands/gm3/ClosePortalCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class ClosePortalCommand extends Command { { @@ -33,7 +34,7 @@ public class ClosePortalCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !closeportal "); diff --git a/src/main/java/client/command/commands/gm3/DebuffCommand.java b/src/main/java/client/command/commands/gm3/DebuffCommand.java index dedc6d853c..696618ee30 100644 --- a/src/main/java/client/command/commands/gm3/DebuffCommand.java +++ b/src/main/java/client/command/commands/gm3/DebuffCommand.java @@ -27,6 +27,7 @@ import client.Character; import client.Client; import client.Disease; import client.command.Command; +import client.command.CommandContext; import server.life.MobSkill; import server.life.MobSkillFactory; import server.life.MobSkillType; @@ -42,7 +43,7 @@ public class DebuffCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !debuff SLOW|SEDUCE|ZOMBIFY|CONFUSE|STUN|POISON|SEAL|DARKNESS|WEAKEN|CURSE"); diff --git a/src/main/java/client/command/commands/gm3/EndEventCommand.java b/src/main/java/client/command/commands/gm3/EndEventCommand.java index ceb13efd91..7b3b43cb82 100644 --- a/src/main/java/client/command/commands/gm3/EndEventCommand.java +++ b/src/main/java/client/command/commands/gm3/EndEventCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class EndEventCommand extends Command { { @@ -33,7 +34,7 @@ public class EndEventCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); c.getChannelServer().setEvent(null); player.dropMessage(5, "You have ended the event. No more players may join."); diff --git a/src/main/java/client/command/commands/gm3/ExpedsCommand.java b/src/main/java/client/command/commands/gm3/ExpedsCommand.java index ed54ea911f..3ffac4f2b5 100644 --- a/src/main/java/client/command/commands/gm3/ExpedsCommand.java +++ b/src/main/java/client/command/commands/gm3/ExpedsCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import net.server.channel.Channel; import server.expeditions.Expedition; @@ -39,7 +40,7 @@ public class ExpedsCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); for (Channel ch : Server.getInstance().getChannelsFromWorld(c.getWorld())) { List expeds = ch.getExpeditions(); diff --git a/src/main/java/client/command/commands/gm3/FaceCommand.java b/src/main/java/client/command/commands/gm3/FaceCommand.java index 2ceed1145c..6893b0a48b 100644 --- a/src/main/java/client/command/commands/gm3/FaceCommand.java +++ b/src/main/java/client/command/commands/gm3/FaceCommand.java @@ -27,6 +27,7 @@ import client.Character; import client.Client; import client.Stat; import client.command.Command; +import client.command.CommandContext; import constants.inventory.ItemConstants; import server.ItemInformationProvider; @@ -36,7 +37,7 @@ public class FaceCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !face [] "); diff --git a/src/main/java/client/command/commands/gm3/FameCommand.java b/src/main/java/client/command/commands/gm3/FameCommand.java index 3cd2819e0b..517745bf87 100644 --- a/src/main/java/client/command/commands/gm3/FameCommand.java +++ b/src/main/java/client/command/commands/gm3/FameCommand.java @@ -27,6 +27,7 @@ import client.Character; import client.Client; import client.Stat; import client.command.Command; +import client.command.CommandContext; public class FameCommand extends Command { { @@ -34,7 +35,7 @@ public class FameCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 2) { player.yellowMessage("Syntax: !fame "); diff --git a/src/main/java/client/command/commands/gm3/FlyCommand.java b/src/main/java/client/command/commands/gm3/FlyCommand.java index 21d92bc258..e1e0a73d22 100644 --- a/src/main/java/client/command/commands/gm3/FlyCommand.java +++ b/src/main/java/client/command/commands/gm3/FlyCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; public class FlyCommand extends Command { @@ -34,7 +35,7 @@ public class FlyCommand extends Command { } @Override - public void execute(Client c, String[] params) { // fly option will become available for any character of that account + public void execute(Client c, String[] params, CommandContext ctx) { // fly option will become available for any character of that account Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !fly "); diff --git a/src/main/java/client/command/commands/gm3/GiveMesosCommand.java b/src/main/java/client/command/commands/gm3/GiveMesosCommand.java index f625c0ed78..5710f7149c 100644 --- a/src/main/java/client/command/commands/gm3/GiveMesosCommand.java +++ b/src/main/java/client/command/commands/gm3/GiveMesosCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class GiveMesosCommand extends Command { { @@ -33,7 +34,7 @@ public class GiveMesosCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !givems [] "); diff --git a/src/main/java/client/command/commands/gm3/GiveNxCommand.java b/src/main/java/client/command/commands/gm3/GiveNxCommand.java index 783d35d699..868fcba4d3 100644 --- a/src/main/java/client/command/commands/gm3/GiveNxCommand.java +++ b/src/main/java/client/command/commands/gm3/GiveNxCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class GiveNxCommand extends Command { { @@ -33,7 +34,7 @@ public class GiveNxCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !givenx [nx, mp, np] [] "); diff --git a/src/main/java/client/command/commands/gm3/GiveRpCommand.java b/src/main/java/client/command/commands/gm3/GiveRpCommand.java index 84d8155e67..7f1c58dd17 100644 --- a/src/main/java/client/command/commands/gm3/GiveRpCommand.java +++ b/src/main/java/client/command/commands/gm3/GiveRpCommand.java @@ -3,6 +3,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class GiveRpCommand extends Command { { @@ -10,7 +11,7 @@ public class GiveRpCommand extends Command { } @Override - public void execute(Client client, String[] params) { + public void execute(Client client, String[] params, CommandContext ctx) { Character player = client.getPlayer(); if (params.length < 2) { player.yellowMessage("Syntax: !giverp "); diff --git a/src/main/java/client/command/commands/gm3/GiveVpCommand.java b/src/main/java/client/command/commands/gm3/GiveVpCommand.java index 6bad23706a..decd1dd386 100644 --- a/src/main/java/client/command/commands/gm3/GiveVpCommand.java +++ b/src/main/java/client/command/commands/gm3/GiveVpCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class GiveVpCommand extends Command { { @@ -33,7 +34,7 @@ public class GiveVpCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 2) { player.yellowMessage("Syntax: !givevp "); diff --git a/src/main/java/client/command/commands/gm3/HairCommand.java b/src/main/java/client/command/commands/gm3/HairCommand.java index eaaebaae65..1cdf108f87 100644 --- a/src/main/java/client/command/commands/gm3/HairCommand.java +++ b/src/main/java/client/command/commands/gm3/HairCommand.java @@ -27,6 +27,7 @@ import client.Character; import client.Client; import client.Stat; import client.command.Command; +import client.command.CommandContext; import constants.inventory.ItemConstants; import server.ItemInformationProvider; @@ -36,7 +37,7 @@ public class HairCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !hair [] "); diff --git a/src/main/java/client/command/commands/gm3/HealMapCommand.java b/src/main/java/client/command/commands/gm3/HealMapCommand.java index 295e46f633..73bf31e892 100644 --- a/src/main/java/client/command/commands/gm3/HealMapCommand.java +++ b/src/main/java/client/command/commands/gm3/HealMapCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class HealMapCommand extends Command { { @@ -33,7 +34,7 @@ public class HealMapCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); for (Character mch : player.getMap().getCharacters()) { if (mch != null) { diff --git a/src/main/java/client/command/commands/gm3/HealPersonCommand.java b/src/main/java/client/command/commands/gm3/HealPersonCommand.java index 50dcd17601..c8a141f842 100644 --- a/src/main/java/client/command/commands/gm3/HealPersonCommand.java +++ b/src/main/java/client/command/commands/gm3/HealPersonCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class HealPersonCommand extends Command { { @@ -33,7 +34,7 @@ public class HealPersonCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]); if (victim != null) { diff --git a/src/main/java/client/command/commands/gm3/HpMpCommand.java b/src/main/java/client/command/commands/gm3/HpMpCommand.java index 520886bdb0..9666f2e06f 100644 --- a/src/main/java/client/command/commands/gm3/HpMpCommand.java +++ b/src/main/java/client/command/commands/gm3/HpMpCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class HpMpCommand extends Command { { @@ -33,7 +34,7 @@ public class HpMpCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); Character victim = player; int statUpdate = 1; diff --git a/src/main/java/client/command/commands/gm3/HurtCommand.java b/src/main/java/client/command/commands/gm3/HurtCommand.java index ee4dc87ce0..e5418eab33 100644 --- a/src/main/java/client/command/commands/gm3/HurtCommand.java +++ b/src/main/java/client/command/commands/gm3/HurtCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class HurtCommand extends Command { { @@ -33,7 +34,7 @@ public class HurtCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]); if (victim != null) { diff --git a/src/main/java/client/command/commands/gm3/IgnoreCommand.java b/src/main/java/client/command/commands/gm3/IgnoreCommand.java index 8428bd22bf..c6415a074a 100644 --- a/src/main/java/client/command/commands/gm3/IgnoreCommand.java +++ b/src/main/java/client/command/commands/gm3/IgnoreCommand.java @@ -27,6 +27,7 @@ import client.Character; import client.Client; import client.autoban.AutobanFactory; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import tools.PacketCreator; @@ -36,7 +37,7 @@ public class IgnoreCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !ignore "); diff --git a/src/main/java/client/command/commands/gm3/IgnoredCommand.java b/src/main/java/client/command/commands/gm3/IgnoredCommand.java index f15ccd863a..33251ac77d 100644 --- a/src/main/java/client/command/commands/gm3/IgnoredCommand.java +++ b/src/main/java/client/command/commands/gm3/IgnoredCommand.java @@ -27,6 +27,7 @@ import client.Character; import client.Client; import client.autoban.AutobanFactory; import client.command.Command; +import client.command.CommandContext; public class IgnoredCommand extends Command { { @@ -34,7 +35,7 @@ public class IgnoredCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); for (int chrId : AutobanFactory.getIgnoredChrIds()) { player.yellowMessage(Character.getNameById(chrId) + " is being ignored."); diff --git a/src/main/java/client/command/commands/gm3/InMapCommand.java b/src/main/java/client/command/commands/gm3/InMapCommand.java index e7173b755c..f1db8c369f 100644 --- a/src/main/java/client/command/commands/gm3/InMapCommand.java +++ b/src/main/java/client/command/commands/gm3/InMapCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class InMapCommand extends Command { { @@ -33,7 +34,7 @@ public class InMapCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); String st = ""; for (Character chr : player.getMap().getCharacters()) { diff --git a/src/main/java/client/command/commands/gm3/KillAllCommand.java b/src/main/java/client/command/commands/gm3/KillAllCommand.java index 787e48343f..8362f53187 100644 --- a/src/main/java/client/command/commands/gm3/KillAllCommand.java +++ b/src/main/java/client/command/commands/gm3/KillAllCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.MobId; import server.life.Monster; import server.maps.MapObject; @@ -41,7 +42,7 @@ public class KillAllCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); MapleMap map = player.getMap(); List monsters = map.getMapObjectsInRange(player.getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapObjectType.MONSTER)); diff --git a/src/main/java/client/command/commands/gm3/KillCommand.java b/src/main/java/client/command/commands/gm3/KillCommand.java index aefb43e55a..370993bc48 100644 --- a/src/main/java/client/command/commands/gm3/KillCommand.java +++ b/src/main/java/client/command/commands/gm3/KillCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import tools.PacketCreator; @@ -35,7 +36,7 @@ public class KillCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !kill "); diff --git a/src/main/java/client/command/commands/gm3/KillMapCommand.java b/src/main/java/client/command/commands/gm3/KillMapCommand.java index babcb59807..b077832b95 100644 --- a/src/main/java/client/command/commands/gm3/KillMapCommand.java +++ b/src/main/java/client/command/commands/gm3/KillMapCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class KillMapCommand extends Command { { @@ -33,7 +34,7 @@ public class KillMapCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); for (Character mch : player.getMap().getCharacters()) { mch.updateHp(0); diff --git a/src/main/java/client/command/commands/gm3/MaxEnergyCommand.java b/src/main/java/client/command/commands/gm3/MaxEnergyCommand.java index 977bb5f19f..05eb351265 100644 --- a/src/main/java/client/command/commands/gm3/MaxEnergyCommand.java +++ b/src/main/java/client/command/commands/gm3/MaxEnergyCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import tools.PacketCreator; public class MaxEnergyCommand extends Command { @@ -34,7 +35,7 @@ public class MaxEnergyCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); c.getPlayer().setDojoEnergy(10000); c.sendPacket(PacketCreator.getEnergy("energy", 10000)); diff --git a/src/main/java/client/command/commands/gm3/MaxHpMpCommand.java b/src/main/java/client/command/commands/gm3/MaxHpMpCommand.java index ed940562fd..e53b1d885c 100644 --- a/src/main/java/client/command/commands/gm3/MaxHpMpCommand.java +++ b/src/main/java/client/command/commands/gm3/MaxHpMpCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class MaxHpMpCommand extends Command { { @@ -33,7 +34,7 @@ public class MaxHpMpCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); Character victim = player; diff --git a/src/main/java/client/command/commands/gm3/MonitorCommand.java b/src/main/java/client/command/commands/gm3/MonitorCommand.java index 7b13819252..4edbf85e45 100644 --- a/src/main/java/client/command/commands/gm3/MonitorCommand.java +++ b/src/main/java/client/command/commands/gm3/MonitorCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.packet.logging.MonitoredChrLogger; import net.server.Server; import tools.PacketCreator; @@ -36,7 +37,7 @@ public class MonitorCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !monitor "); diff --git a/src/main/java/client/command/commands/gm3/MonitorsCommand.java b/src/main/java/client/command/commands/gm3/MonitorsCommand.java index 841433a7c7..761ebae9e3 100644 --- a/src/main/java/client/command/commands/gm3/MonitorsCommand.java +++ b/src/main/java/client/command/commands/gm3/MonitorsCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.packet.logging.MonitoredChrLogger; public class MonitorsCommand extends Command { @@ -34,7 +35,7 @@ public class MonitorsCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); for (int chrId : MonitoredChrLogger.getMonitoredChrIds()) { player.yellowMessage(Character.getNameById(chrId) + " is being monitored."); diff --git a/src/main/java/client/command/commands/gm3/MusicCommand.java b/src/main/java/client/command/commands/gm3/MusicCommand.java index a563c0b7e5..f398253a75 100644 --- a/src/main/java/client/command/commands/gm3/MusicCommand.java +++ b/src/main/java/client/command/commands/gm3/MusicCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.game.GameConstants; import constants.id.NpcId; import tools.PacketCreator; @@ -45,7 +46,7 @@ public class MusicCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { diff --git a/src/main/java/client/command/commands/gm3/MuteMapCommand.java b/src/main/java/client/command/commands/gm3/MuteMapCommand.java index f442723bef..c871d4f30c 100644 --- a/src/main/java/client/command/commands/gm3/MuteMapCommand.java +++ b/src/main/java/client/command/commands/gm3/MuteMapCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class MuteMapCommand extends Command { { @@ -33,7 +34,7 @@ public class MuteMapCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (player.getMap().isMuted()) { player.getMap().setMuted(false); diff --git a/src/main/java/client/command/commands/gm3/NightCommand.java b/src/main/java/client/command/commands/gm3/NightCommand.java index 3dfaeb5fe3..63eb25fc33 100644 --- a/src/main/java/client/command/commands/gm3/NightCommand.java +++ b/src/main/java/client/command/commands/gm3/NightCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class NightCommand extends Command { { @@ -33,7 +34,7 @@ public class NightCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); player.getMap().broadcastNightEffect(); player.yellowMessage("Done."); diff --git a/src/main/java/client/command/commands/gm3/NoticeCommand.java b/src/main/java/client/command/commands/gm3/NoticeCommand.java index 083365c9af..87d7e85acf 100644 --- a/src/main/java/client/command/commands/gm3/NoticeCommand.java +++ b/src/main/java/client/command/commands/gm3/NoticeCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import tools.PacketCreator; @@ -35,7 +36,7 @@ public class NoticeCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[Notice] " + player.getLastCommandMessage())); } diff --git a/src/main/java/client/command/commands/gm3/NpcCommand.java b/src/main/java/client/command/commands/gm3/NpcCommand.java index 9fe52f77bf..3d5edf7c41 100644 --- a/src/main/java/client/command/commands/gm3/NpcCommand.java +++ b/src/main/java/client/command/commands/gm3/NpcCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.life.LifeFactory; import server.life.NPC; import tools.PacketCreator; @@ -36,7 +37,7 @@ public class NpcCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !npc "); diff --git a/src/main/java/client/command/commands/gm3/OnlineTwoCommand.java b/src/main/java/client/command/commands/gm3/OnlineTwoCommand.java index cdba346eb3..2627782b10 100644 --- a/src/main/java/client/command/commands/gm3/OnlineTwoCommand.java +++ b/src/main/java/client/command/commands/gm3/OnlineTwoCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import net.server.channel.Channel; @@ -35,7 +36,7 @@ public class OnlineTwoCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); int total = 0; for (Channel ch : Server.getInstance().getChannelsFromWorld(player.getWorld())) { diff --git a/src/main/java/client/command/commands/gm3/OpenPortalCommand.java b/src/main/java/client/command/commands/gm3/OpenPortalCommand.java index 41400b5158..d99cfc2497 100644 --- a/src/main/java/client/command/commands/gm3/OpenPortalCommand.java +++ b/src/main/java/client/command/commands/gm3/OpenPortalCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class OpenPortalCommand extends Command { { @@ -33,7 +34,7 @@ public class OpenPortalCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !openportal "); diff --git a/src/main/java/client/command/commands/gm3/PeCommand.java b/src/main/java/client/command/commands/gm3/PeCommand.java index 6ee35f394a..78e4bc5330 100644 --- a/src/main/java/client/command/commands/gm3/PeCommand.java +++ b/src/main/java/client/command/commands/gm3/PeCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import io.netty.buffer.Unpooled; import net.PacketHandler; import net.PacketProcessor; @@ -49,7 +50,7 @@ public class PeCommand extends Command { private static final Logger log = LoggerFactory.getLogger(PeCommand.class); @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); String packet = ""; try (BufferedReader br = Files.newBufferedReader(Path.of("pe.txt"))) { diff --git a/src/main/java/client/command/commands/gm3/PosCommand.java b/src/main/java/client/command/commands/gm3/PosCommand.java index 5928a351e5..ac538d153e 100644 --- a/src/main/java/client/command/commands/gm3/PosCommand.java +++ b/src/main/java/client/command/commands/gm3/PosCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class PosCommand extends Command { { @@ -33,7 +34,7 @@ public class PosCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); float xpos = player.getPosition().x; float ypos = player.getPosition().y; diff --git a/src/main/java/client/command/commands/gm3/QuestCompleteCommand.java b/src/main/java/client/command/commands/gm3/QuestCompleteCommand.java index 98bdeb5f7b..68c5ec1ccd 100644 --- a/src/main/java/client/command/commands/gm3/QuestCompleteCommand.java +++ b/src/main/java/client/command/commands/gm3/QuestCompleteCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.quest.Quest; public class QuestCompleteCommand extends Command { @@ -34,7 +35,7 @@ public class QuestCompleteCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { diff --git a/src/main/java/client/command/commands/gm3/QuestResetCommand.java b/src/main/java/client/command/commands/gm3/QuestResetCommand.java index cfb35da64a..9316a09d6c 100644 --- a/src/main/java/client/command/commands/gm3/QuestResetCommand.java +++ b/src/main/java/client/command/commands/gm3/QuestResetCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.quest.Quest; public class QuestResetCommand extends Command { @@ -34,7 +35,7 @@ public class QuestResetCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { diff --git a/src/main/java/client/command/commands/gm3/QuestStartCommand.java b/src/main/java/client/command/commands/gm3/QuestStartCommand.java index 3eeee90331..7fc8821a18 100644 --- a/src/main/java/client/command/commands/gm3/QuestStartCommand.java +++ b/src/main/java/client/command/commands/gm3/QuestStartCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.quest.Quest; public class QuestStartCommand extends Command { @@ -34,7 +35,7 @@ public class QuestStartCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { diff --git a/src/main/java/client/command/commands/gm3/ReloadDropsCommand.java b/src/main/java/client/command/commands/gm3/ReloadDropsCommand.java index da88d321b8..05f6d1afc2 100644 --- a/src/main/java/client/command/commands/gm3/ReloadDropsCommand.java +++ b/src/main/java/client/command/commands/gm3/ReloadDropsCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.life.MonsterInformationProvider; public class ReloadDropsCommand extends Command { @@ -34,7 +35,7 @@ public class ReloadDropsCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); MonsterInformationProvider.getInstance().clearDrops(); player.dropMessage(5, "Reloaded Drops"); diff --git a/src/main/java/client/command/commands/gm3/ReloadEventsCommand.java b/src/main/java/client/command/commands/gm3/ReloadEventsCommand.java index 4feeeffa1b..5f8d2cdebb 100644 --- a/src/main/java/client/command/commands/gm3/ReloadEventsCommand.java +++ b/src/main/java/client/command/commands/gm3/ReloadEventsCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import net.server.channel.Channel; @@ -35,7 +36,7 @@ public class ReloadEventsCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); for (Channel ch : Server.getInstance().getAllChannels()) { ch.reloadEventScriptManager(); diff --git a/src/main/java/client/command/commands/gm3/ReloadMapCommand.java b/src/main/java/client/command/commands/gm3/ReloadMapCommand.java index 1708697456..d6146cee30 100644 --- a/src/main/java/client/command/commands/gm3/ReloadMapCommand.java +++ b/src/main/java/client/command/commands/gm3/ReloadMapCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.maps.MapleMap; import java.util.Collection; @@ -36,7 +37,7 @@ public class ReloadMapCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); MapleMap newMap = c.getChannelServer().getMapFactory().resetMap(player.getMapId()); int callerid = c.getPlayer().getId(); diff --git a/src/main/java/client/command/commands/gm3/ReloadPortalsCommand.java b/src/main/java/client/command/commands/gm3/ReloadPortalsCommand.java index 44f593c801..06d3b25cec 100644 --- a/src/main/java/client/command/commands/gm3/ReloadPortalsCommand.java +++ b/src/main/java/client/command/commands/gm3/ReloadPortalsCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import scripting.portal.PortalScriptManager; public class ReloadPortalsCommand extends Command { @@ -34,7 +35,7 @@ public class ReloadPortalsCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); PortalScriptManager.getInstance().reloadPortalScripts(); player.dropMessage(5, "Reloaded Portals"); diff --git a/src/main/java/client/command/commands/gm3/ReloadShopsCommand.java b/src/main/java/client/command/commands/gm3/ReloadShopsCommand.java index f98daf3e20..a39bfd2550 100644 --- a/src/main/java/client/command/commands/gm3/ReloadShopsCommand.java +++ b/src/main/java/client/command/commands/gm3/ReloadShopsCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm3; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.ShopFactory; @@ -34,7 +35,7 @@ public class ReloadShopsCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { ShopFactory.getInstance().reloadShops(); } } diff --git a/src/main/java/client/command/commands/gm3/RipCommand.java b/src/main/java/client/command/commands/gm3/RipCommand.java index 0d17b6d41f..29339eeadd 100644 --- a/src/main/java/client/command/commands/gm3/RipCommand.java +++ b/src/main/java/client/command/commands/gm3/RipCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import tools.PacketCreator; @@ -35,7 +36,7 @@ public class RipCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[RIP]: " + joinStringFrom(params, 1))); } diff --git a/src/main/java/client/command/commands/gm3/SeedCommand.java b/src/main/java/client/command/commands/gm3/SeedCommand.java index 19e3bb8cbd..a9911e515c 100644 --- a/src/main/java/client/command/commands/gm3/SeedCommand.java +++ b/src/main/java/client/command/commands/gm3/SeedCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import client.inventory.Item; import constants.id.ItemId; import constants.id.MapId; @@ -38,7 +39,7 @@ public class SeedCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (player.getMapId() != MapId.HENESYS_PQ) { player.yellowMessage("This command can only be used in HPQ."); diff --git a/src/main/java/client/command/commands/gm3/SpawnCommand.java b/src/main/java/client/command/commands/gm3/SpawnCommand.java index cc490d75be..96466f0af3 100644 --- a/src/main/java/client/command/commands/gm3/SpawnCommand.java +++ b/src/main/java/client/command/commands/gm3/SpawnCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.life.LifeFactory; import server.life.Monster; @@ -35,7 +36,7 @@ public class SpawnCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !spawn []"); diff --git a/src/main/java/client/command/commands/gm3/StartEventCommand.java b/src/main/java/client/command/commands/gm3/StartEventCommand.java index c5072bdc92..f480cfe502 100644 --- a/src/main/java/client/command/commands/gm3/StartEventCommand.java +++ b/src/main/java/client/command/commands/gm3/StartEventCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import server.events.gm.Event; import tools.PacketCreator; @@ -36,7 +37,7 @@ public class StartEventCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); int players = 50; if (params.length > 1) { diff --git a/src/main/java/client/command/commands/gm3/StartMapEventCommand.java b/src/main/java/client/command/commands/gm3/StartMapEventCommand.java index b269c04be6..325440a5c9 100644 --- a/src/main/java/client/command/commands/gm3/StartMapEventCommand.java +++ b/src/main/java/client/command/commands/gm3/StartMapEventCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm3; import client.Client; import client.command.Command; +import client.command.CommandContext; public class StartMapEventCommand extends Command { { @@ -32,7 +33,7 @@ public class StartMapEventCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { c.getPlayer().getMap().startEvent(c.getPlayer()); } } diff --git a/src/main/java/client/command/commands/gm3/StopMapEventCommand.java b/src/main/java/client/command/commands/gm3/StopMapEventCommand.java index 8b541c6996..0f4d7cdc1a 100644 --- a/src/main/java/client/command/commands/gm3/StopMapEventCommand.java +++ b/src/main/java/client/command/commands/gm3/StopMapEventCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm3; import client.Client; import client.command.Command; +import client.command.CommandContext; public class StopMapEventCommand extends Command { { @@ -32,7 +33,7 @@ public class StopMapEventCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { c.getPlayer().getMap().setEventStarted(false); } } diff --git a/src/main/java/client/command/commands/gm3/TimerAllCommand.java b/src/main/java/client/command/commands/gm3/TimerAllCommand.java index 18d0d3a954..3f45f610bc 100644 --- a/src/main/java/client/command/commands/gm3/TimerAllCommand.java +++ b/src/main/java/client/command/commands/gm3/TimerAllCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import tools.PacketCreator; public class TimerAllCommand extends Command { @@ -34,7 +35,7 @@ public class TimerAllCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !timerall |remove"); diff --git a/src/main/java/client/command/commands/gm3/TimerCommand.java b/src/main/java/client/command/commands/gm3/TimerCommand.java index 9c7a5cfb54..66a1d81454 100644 --- a/src/main/java/client/command/commands/gm3/TimerCommand.java +++ b/src/main/java/client/command/commands/gm3/TimerCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import tools.PacketCreator; public class TimerCommand extends Command { @@ -34,7 +35,7 @@ public class TimerCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 2) { player.yellowMessage("Syntax: !timer |remove"); diff --git a/src/main/java/client/command/commands/gm3/TimerMapCommand.java b/src/main/java/client/command/commands/gm3/TimerMapCommand.java index 2456dd682b..13a9e9a7da 100644 --- a/src/main/java/client/command/commands/gm3/TimerMapCommand.java +++ b/src/main/java/client/command/commands/gm3/TimerMapCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import tools.PacketCreator; public class TimerMapCommand extends Command { @@ -34,7 +35,7 @@ public class TimerMapCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !timermap |remove"); diff --git a/src/main/java/client/command/commands/gm3/ToggleCouponCommand.java b/src/main/java/client/command/commands/gm3/ToggleCouponCommand.java index 03046c04ba..c8672309ac 100644 --- a/src/main/java/client/command/commands/gm3/ToggleCouponCommand.java +++ b/src/main/java/client/command/commands/gm3/ToggleCouponCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; public class ToggleCouponCommand extends Command { @@ -34,7 +35,7 @@ public class ToggleCouponCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !togglecoupon "); diff --git a/src/main/java/client/command/commands/gm3/UnBanCommand.java b/src/main/java/client/command/commands/gm3/UnBanCommand.java index 7f9cf7fe34..fecbaaddeb 100644 --- a/src/main/java/client/command/commands/gm3/UnBanCommand.java +++ b/src/main/java/client/command/commands/gm3/UnBanCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm3; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import tools.DatabaseConnection; import java.sql.Connection; @@ -37,7 +38,7 @@ public class UnBanCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !unban "); diff --git a/src/main/java/client/command/commands/gm4/BossDropRateCommand.java b/src/main/java/client/command/commands/gm4/BossDropRateCommand.java index 0bf9a54927..7f386d1ac4 100644 --- a/src/main/java/client/command/commands/gm4/BossDropRateCommand.java +++ b/src/main/java/client/command/commands/gm4/BossDropRateCommand.java @@ -22,6 +22,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import tools.PacketCreator; /** @@ -33,7 +34,7 @@ public class BossDropRateCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !bossdroprate "); diff --git a/src/main/java/client/command/commands/gm4/CakeCommand.java b/src/main/java/client/command/commands/gm4/CakeCommand.java index 3b2ba63f1a..cf13b49ebe 100644 --- a/src/main/java/client/command/commands/gm4/CakeCommand.java +++ b/src/main/java/client/command/commands/gm4/CakeCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.MobId; import server.life.LifeFactory; import server.life.Monster; @@ -36,7 +37,7 @@ public class CakeCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); Monster monster = LifeFactory.getMonster(MobId.GIANT_CAKE); if (params.length == 1) { diff --git a/src/main/java/client/command/commands/gm4/DropRateCommand.java b/src/main/java/client/command/commands/gm4/DropRateCommand.java index 1a94e3d77e..9d5c472141 100644 --- a/src/main/java/client/command/commands/gm4/DropRateCommand.java +++ b/src/main/java/client/command/commands/gm4/DropRateCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import tools.PacketCreator; public class DropRateCommand extends Command { @@ -34,7 +35,7 @@ public class DropRateCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !droprate "); diff --git a/src/main/java/client/command/commands/gm4/ExpRateCommand.java b/src/main/java/client/command/commands/gm4/ExpRateCommand.java index 5b363c6927..6b3a5cb0ce 100644 --- a/src/main/java/client/command/commands/gm4/ExpRateCommand.java +++ b/src/main/java/client/command/commands/gm4/ExpRateCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import tools.PacketCreator; public class ExpRateCommand extends Command { @@ -34,7 +35,7 @@ public class ExpRateCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !exprate "); diff --git a/src/main/java/client/command/commands/gm4/FishingRateCommand.java b/src/main/java/client/command/commands/gm4/FishingRateCommand.java index 532d94f649..d848475090 100644 --- a/src/main/java/client/command/commands/gm4/FishingRateCommand.java +++ b/src/main/java/client/command/commands/gm4/FishingRateCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import tools.PacketCreator; public class FishingRateCommand extends Command { @@ -34,7 +35,7 @@ public class FishingRateCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !fishrate "); diff --git a/src/main/java/client/command/commands/gm4/ForceVacCommand.java b/src/main/java/client/command/commands/gm4/ForceVacCommand.java index 02a3a816a9..75abd226e0 100644 --- a/src/main/java/client/command/commands/gm4/ForceVacCommand.java +++ b/src/main/java/client/command/commands/gm4/ForceVacCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import client.inventory.Pet; import client.inventory.manipulator.InventoryManipulator; import constants.id.ItemId; @@ -43,7 +44,7 @@ public class ForceVacCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); List items = player.getMap().getMapObjectsInRange(player.getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapObjectType.ITEM)); for (MapObject item : items) { diff --git a/src/main/java/client/command/commands/gm4/HorntailCommand.java b/src/main/java/client/command/commands/gm4/HorntailCommand.java index dffe66d390..152e8d2fca 100644 --- a/src/main/java/client/command/commands/gm4/HorntailCommand.java +++ b/src/main/java/client/command/commands/gm4/HorntailCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.maps.MapleMap; import java.awt.*; @@ -36,7 +37,7 @@ public class HorntailCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); final Point targetPoint = player.getPosition(); final MapleMap targetMap = player.getMap(); diff --git a/src/main/java/client/command/commands/gm4/ItemVacCommand.java b/src/main/java/client/command/commands/gm4/ItemVacCommand.java index a0bf4238bb..3bd7149aed 100644 --- a/src/main/java/client/command/commands/gm4/ItemVacCommand.java +++ b/src/main/java/client/command/commands/gm4/ItemVacCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.maps.MapObject; import server.maps.MapObjectType; @@ -38,7 +39,7 @@ public class ItemVacCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); List list = player.getMap().getMapObjectsInRange(player.getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapObjectType.ITEM)); for (MapObject item : list) { diff --git a/src/main/java/client/command/commands/gm4/MesoRateCommand.java b/src/main/java/client/command/commands/gm4/MesoRateCommand.java index 4680c0cefc..7974979910 100644 --- a/src/main/java/client/command/commands/gm4/MesoRateCommand.java +++ b/src/main/java/client/command/commands/gm4/MesoRateCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import tools.PacketCreator; public class MesoRateCommand extends Command { @@ -34,7 +35,7 @@ public class MesoRateCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !mesorate "); diff --git a/src/main/java/client/command/commands/gm4/PapCommand.java b/src/main/java/client/command/commands/gm4/PapCommand.java index f0ddecc792..895c8e2610 100644 --- a/src/main/java/client/command/commands/gm4/PapCommand.java +++ b/src/main/java/client/command/commands/gm4/PapCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.MobId; import server.life.LifeFactory; @@ -35,7 +36,7 @@ public class PapCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); // thanks Conrad for noticing mobid typo here diff --git a/src/main/java/client/command/commands/gm4/PianusCommand.java b/src/main/java/client/command/commands/gm4/PianusCommand.java index 4a5d7fe739..ceacdf88f5 100644 --- a/src/main/java/client/command/commands/gm4/PianusCommand.java +++ b/src/main/java/client/command/commands/gm4/PianusCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.MobId; import server.life.LifeFactory; @@ -35,7 +36,7 @@ public class PianusCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(MobId.PIANUS_R), player.getPosition()); } diff --git a/src/main/java/client/command/commands/gm4/PinkbeanCommand.java b/src/main/java/client/command/commands/gm4/PinkbeanCommand.java index 37cee3ae11..4c4cc10f96 100644 --- a/src/main/java/client/command/commands/gm4/PinkbeanCommand.java +++ b/src/main/java/client/command/commands/gm4/PinkbeanCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.MobId; import server.life.LifeFactory; @@ -35,7 +36,7 @@ public class PinkbeanCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); player.getMap().spawnMonsterOnGroundBelow(LifeFactory.getMonster(MobId.PINK_BEAN), player.getPosition()); diff --git a/src/main/java/client/command/commands/gm4/PlayerNpcCommand.java b/src/main/java/client/command/commands/gm4/PlayerNpcCommand.java index d4d5ae0316..e088ebbab4 100644 --- a/src/main/java/client/command/commands/gm4/PlayerNpcCommand.java +++ b/src/main/java/client/command/commands/gm4/PlayerNpcCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.life.PlayerNPC; public class PlayerNpcCommand extends Command { @@ -34,7 +35,7 @@ public class PlayerNpcCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !playernpc "); diff --git a/src/main/java/client/command/commands/gm4/PlayerNpcRemoveCommand.java b/src/main/java/client/command/commands/gm4/PlayerNpcRemoveCommand.java index 68616156ba..1ef57925ac 100644 --- a/src/main/java/client/command/commands/gm4/PlayerNpcRemoveCommand.java +++ b/src/main/java/client/command/commands/gm4/PlayerNpcRemoveCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.life.PlayerNPC; public class PlayerNpcRemoveCommand extends Command { @@ -34,7 +35,7 @@ public class PlayerNpcRemoveCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !playernpcremove "); diff --git a/src/main/java/client/command/commands/gm4/PmobCommand.java b/src/main/java/client/command/commands/gm4/PmobCommand.java index 7b918a8d94..e61eb201ed 100644 --- a/src/main/java/client/command/commands/gm4/PmobCommand.java +++ b/src/main/java/client/command/commands/gm4/PmobCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.channel.Channel; import server.life.LifeFactory; import server.life.Monster; @@ -43,7 +44,7 @@ public class PmobCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !pmob []"); @@ -99,4 +100,4 @@ public class PmobCommand extends Command { player.dropMessage(5, "You have entered an invalid mob id."); } } -} \ No newline at end of file +} diff --git a/src/main/java/client/command/commands/gm4/PmobRemoveCommand.java b/src/main/java/client/command/commands/gm4/PmobRemoveCommand.java index f2abbea2a0..4583c99d84 100644 --- a/src/main/java/client/command/commands/gm4/PmobRemoveCommand.java +++ b/src/main/java/client/command/commands/gm4/PmobRemoveCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.channel.Channel; import server.maps.MapleMap; import tools.DatabaseConnection; @@ -45,7 +46,7 @@ public class PmobRemoveCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); int mapId = player.getMapId(); @@ -107,4 +108,4 @@ public class PmobRemoveCommand extends Command { player.yellowMessage("Cleared " + toRemove.size() + " pmob placements."); } -} \ No newline at end of file +} diff --git a/src/main/java/client/command/commands/gm4/PnpcCommand.java b/src/main/java/client/command/commands/gm4/PnpcCommand.java index e6212b27c4..f8791b912a 100644 --- a/src/main/java/client/command/commands/gm4/PnpcCommand.java +++ b/src/main/java/client/command/commands/gm4/PnpcCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.channel.Channel; import server.life.LifeFactory; import server.life.NPC; @@ -44,7 +45,7 @@ public class PnpcCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !pnpc "); @@ -106,4 +107,4 @@ public class PnpcCommand extends Command { player.dropMessage(5, "You have entered an invalid NPC id."); } } -} \ No newline at end of file +} diff --git a/src/main/java/client/command/commands/gm4/PnpcRemoveCommand.java b/src/main/java/client/command/commands/gm4/PnpcRemoveCommand.java index a062496d15..4721ec11fe 100644 --- a/src/main/java/client/command/commands/gm4/PnpcRemoveCommand.java +++ b/src/main/java/client/command/commands/gm4/PnpcRemoveCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.channel.Channel; import server.maps.MapleMap; import tools.DatabaseConnection; @@ -45,7 +46,7 @@ public class PnpcRemoveCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); int mapId = player.getMapId(); @@ -107,4 +108,4 @@ public class PnpcRemoveCommand extends Command { player.yellowMessage("Cleared " + toRemove.size() + " pNPC placements."); } -} \ No newline at end of file +} diff --git a/src/main/java/client/command/commands/gm4/ProItemCommand.java b/src/main/java/client/command/commands/gm4/ProItemCommand.java index 7ecab53fad..5f35043a2e 100644 --- a/src/main/java/client/command/commands/gm4/ProItemCommand.java +++ b/src/main/java/client/command/commands/gm4/ProItemCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import client.inventory.Equip; import client.inventory.InventoryType; import client.inventory.Item; @@ -39,7 +40,7 @@ public class ProItemCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 2) { player.yellowMessage("Syntax: !proitem []"); diff --git a/src/main/java/client/command/commands/gm4/QuestRateCommand.java b/src/main/java/client/command/commands/gm4/QuestRateCommand.java index c880d7a166..3286eaf1c9 100644 --- a/src/main/java/client/command/commands/gm4/QuestRateCommand.java +++ b/src/main/java/client/command/commands/gm4/QuestRateCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import tools.PacketCreator; public class QuestRateCommand extends Command { @@ -34,7 +35,7 @@ public class QuestRateCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !questrate "); diff --git a/src/main/java/client/command/commands/gm4/ServerMessageCommand.java b/src/main/java/client/command/commands/gm4/ServerMessageCommand.java index 2fd43e483c..6b423e8262 100644 --- a/src/main/java/client/command/commands/gm4/ServerMessageCommand.java +++ b/src/main/java/client/command/commands/gm4/ServerMessageCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class ServerMessageCommand extends Command { { @@ -33,7 +34,7 @@ public class ServerMessageCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); c.getWorldServer().setServerMessage(player.getLastCommandMessage()); } diff --git a/src/main/java/client/command/commands/gm4/SetEqStatCommand.java b/src/main/java/client/command/commands/gm4/SetEqStatCommand.java index 115654b4b6..f9d71260ba 100644 --- a/src/main/java/client/command/commands/gm4/SetEqStatCommand.java +++ b/src/main/java/client/command/commands/gm4/SetEqStatCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import client.inventory.Equip; import client.inventory.Inventory; import client.inventory.InventoryType; @@ -37,7 +38,7 @@ public class SetEqStatCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !seteqstat []"); diff --git a/src/main/java/client/command/commands/gm4/TravelRateCommand.java b/src/main/java/client/command/commands/gm4/TravelRateCommand.java index aabb8605aa..05c2f2657a 100644 --- a/src/main/java/client/command/commands/gm4/TravelRateCommand.java +++ b/src/main/java/client/command/commands/gm4/TravelRateCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import tools.PacketCreator; public class TravelRateCommand extends Command { @@ -34,7 +35,7 @@ public class TravelRateCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !travelrate "); diff --git a/src/main/java/client/command/commands/gm4/ZakumCommand.java b/src/main/java/client/command/commands/gm4/ZakumCommand.java index eeea31f45f..6f69e9ae1c 100644 --- a/src/main/java/client/command/commands/gm4/ZakumCommand.java +++ b/src/main/java/client/command/commands/gm4/ZakumCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm4; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.MobId; import server.life.LifeFactory; @@ -35,7 +36,7 @@ public class ZakumCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); player.getMap().spawnFakeMonsterOnGroundBelow(LifeFactory.getMonster(MobId.ZAKUM_1), player.getPosition()); for (int mobId = MobId.ZAKUM_ARM_1; mobId <= MobId.ZAKUM_ARM_8; mobId++) { diff --git a/src/main/java/client/command/commands/gm5/DebugCommand.java b/src/main/java/client/command/commands/gm5/DebugCommand.java index 5800f1ea92..d0a6974def 100644 --- a/src/main/java/client/command/commands/gm5/DebugCommand.java +++ b/src/main/java/client/command/commands/gm5/DebugCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm5; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.id.NpcId; import net.server.Server; import server.TimerManager; @@ -48,7 +49,7 @@ public class DebugCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { diff --git a/src/main/java/client/command/commands/gm5/IpListCommand.java b/src/main/java/client/command/commands/gm5/IpListCommand.java index 3661c8f31b..5ff9b40fd0 100644 --- a/src/main/java/client/command/commands/gm5/IpListCommand.java +++ b/src/main/java/client/command/commands/gm5/IpListCommand.java @@ -22,6 +22,7 @@ package client.command.commands.gm5; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.game.GameConstants; import net.server.Server; import net.server.world.World; @@ -39,7 +40,7 @@ public class IpListCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { String str = "Player-IP relation:"; for (World w : Server.getInstance().getWorlds()) { @@ -57,4 +58,4 @@ public class IpListCommand extends Command { c.getAbstractPlayerInteraction().npcTalk(22000, str); } -} \ No newline at end of file +} diff --git a/src/main/java/client/command/commands/gm5/SetCommand.java b/src/main/java/client/command/commands/gm5/SetCommand.java index f42dd1fb1b..9291a1c8ab 100644 --- a/src/main/java/client/command/commands/gm5/SetCommand.java +++ b/src/main/java/client/command/commands/gm5/SetCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm5; import client.Client; import client.command.Command; +import client.command.CommandContext; import constants.net.ServerConstants; public class SetCommand extends Command { @@ -33,7 +34,7 @@ public class SetCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { for (int i = 0; i < params.length; i++) { ServerConstants.DEBUG_VALUES[i] = Integer.parseInt(params[i]); } diff --git a/src/main/java/client/command/commands/gm5/ShowMoveLifeCommand.java b/src/main/java/client/command/commands/gm5/ShowMoveLifeCommand.java index d269cc956f..578f4f6e1a 100644 --- a/src/main/java/client/command/commands/gm5/ShowMoveLifeCommand.java +++ b/src/main/java/client/command/commands/gm5/ShowMoveLifeCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm5; import client.Client; import client.command.Command; +import client.command.CommandContext; import config.YamlConfig; public class ShowMoveLifeCommand extends Command { @@ -33,7 +34,7 @@ public class ShowMoveLifeCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { YamlConfig.config.server.USE_DEBUG_SHOW_RCVD_MVLIFE = !YamlConfig.config.server.USE_DEBUG_SHOW_RCVD_MVLIFE; } } diff --git a/src/main/java/client/command/commands/gm5/ShowPacketsCommand.java b/src/main/java/client/command/commands/gm5/ShowPacketsCommand.java index 03bf3bf49e..5b745b658a 100644 --- a/src/main/java/client/command/commands/gm5/ShowPacketsCommand.java +++ b/src/main/java/client/command/commands/gm5/ShowPacketsCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm5; import client.Client; import client.command.Command; +import client.command.CommandContext; import config.YamlConfig; public class ShowPacketsCommand extends Command { @@ -33,7 +34,7 @@ public class ShowPacketsCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { YamlConfig.config.server.USE_DEBUG_SHOW_RCVD_PACKET = !YamlConfig.config.server.USE_DEBUG_SHOW_RCVD_PACKET; } } diff --git a/src/main/java/client/command/commands/gm5/ShowSessionsCommand.java b/src/main/java/client/command/commands/gm5/ShowSessionsCommand.java index acc4d78e51..01d0ad5da0 100644 --- a/src/main/java/client/command/commands/gm5/ShowSessionsCommand.java +++ b/src/main/java/client/command/commands/gm5/ShowSessionsCommand.java @@ -21,6 +21,7 @@ package client.command.commands.gm5; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.coordinator.session.SessionCoordinator; /** @@ -32,7 +33,7 @@ public class ShowSessionsCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { SessionCoordinator.getInstance().printSessionTrace(c); } } diff --git a/src/main/java/client/command/commands/gm6/ClearQuestCacheCommand.java b/src/main/java/client/command/commands/gm6/ClearQuestCacheCommand.java index 5f094f5600..8496a61c24 100644 --- a/src/main/java/client/command/commands/gm6/ClearQuestCacheCommand.java +++ b/src/main/java/client/command/commands/gm6/ClearQuestCacheCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm6; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.quest.Quest; public class ClearQuestCacheCommand extends Command { @@ -34,7 +35,7 @@ public class ClearQuestCacheCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); Quest.clearCache(); player.dropMessage(5, "Quest Cache Cleared."); diff --git a/src/main/java/client/command/commands/gm6/ClearQuestCommand.java b/src/main/java/client/command/commands/gm6/ClearQuestCommand.java index 79707eff05..77b297d168 100644 --- a/src/main/java/client/command/commands/gm6/ClearQuestCommand.java +++ b/src/main/java/client/command/commands/gm6/ClearQuestCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm6; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.quest.Quest; public class ClearQuestCommand extends Command { @@ -34,7 +35,7 @@ public class ClearQuestCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.dropMessage(5, "Please include a quest ID."); diff --git a/src/main/java/client/command/commands/gm6/DCAllCommand.java b/src/main/java/client/command/commands/gm6/DCAllCommand.java index f8298a4534..0ab5e55789 100644 --- a/src/main/java/client/command/commands/gm6/DCAllCommand.java +++ b/src/main/java/client/command/commands/gm6/DCAllCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm6; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import net.server.world.World; @@ -35,7 +36,7 @@ public class DCAllCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); for (World world : Server.getInstance().getWorlds()) { for (Character chr : world.getPlayerStorage().getAllCharacters()) { diff --git a/src/main/java/client/command/commands/gm6/EraseAllPNpcsCommand.java b/src/main/java/client/command/commands/gm6/EraseAllPNpcsCommand.java index 6f6394454c..44dc7ffc59 100644 --- a/src/main/java/client/command/commands/gm6/EraseAllPNpcsCommand.java +++ b/src/main/java/client/command/commands/gm6/EraseAllPNpcsCommand.java @@ -25,6 +25,7 @@ package client.command.commands.gm6; import client.Client; import client.command.Command; +import client.command.CommandContext; import server.life.PlayerNPC; public class EraseAllPNpcsCommand extends Command { @@ -33,7 +34,7 @@ public class EraseAllPNpcsCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { PlayerNPC.removeAllPlayerNPC(); } } diff --git a/src/main/java/client/command/commands/gm6/GetAccCommand.java b/src/main/java/client/command/commands/gm6/GetAccCommand.java index 00b81c69ac..274e799607 100644 --- a/src/main/java/client/command/commands/gm6/GetAccCommand.java +++ b/src/main/java/client/command/commands/gm6/GetAccCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm6; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class GetAccCommand extends Command { { @@ -33,7 +34,7 @@ public class GetAccCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !getacc "); diff --git a/src/main/java/client/command/commands/gm6/MapPlayersCommand.java b/src/main/java/client/command/commands/gm6/MapPlayersCommand.java index 2404bd9bc0..ff705ac0af 100644 --- a/src/main/java/client/command/commands/gm6/MapPlayersCommand.java +++ b/src/main/java/client/command/commands/gm6/MapPlayersCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm6; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import net.server.world.World; @@ -35,7 +36,7 @@ public class MapPlayersCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); String names = ""; int map = player.getMapId(); diff --git a/src/main/java/client/command/commands/gm6/SaveAllCommand.java b/src/main/java/client/command/commands/gm6/SaveAllCommand.java index 28df7b456f..0b6bbb42c3 100644 --- a/src/main/java/client/command/commands/gm6/SaveAllCommand.java +++ b/src/main/java/client/command/commands/gm6/SaveAllCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm6; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import net.server.world.World; import tools.PacketCreator; @@ -36,7 +37,7 @@ public class SaveAllCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); for (World world : Server.getInstance().getWorlds()) { for (Character chr : world.getPlayerStorage().getAllCharacters()) { diff --git a/src/main/java/client/command/commands/gm6/ServerAddChannelCommand.java b/src/main/java/client/command/commands/gm6/ServerAddChannelCommand.java index 4f438c6b53..1565f442b6 100644 --- a/src/main/java/client/command/commands/gm6/ServerAddChannelCommand.java +++ b/src/main/java/client/command/commands/gm6/ServerAddChannelCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm6; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import server.ThreadManager; @@ -35,7 +36,7 @@ public class ServerAddChannelCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { final Character player = c.getPlayer(); if (params.length < 1) { diff --git a/src/main/java/client/command/commands/gm6/ServerAddWorldCommand.java b/src/main/java/client/command/commands/gm6/ServerAddWorldCommand.java index ae611f904d..9036888cf3 100644 --- a/src/main/java/client/command/commands/gm6/ServerAddWorldCommand.java +++ b/src/main/java/client/command/commands/gm6/ServerAddWorldCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm6; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import server.ThreadManager; @@ -35,7 +36,7 @@ public class ServerAddWorldCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { final Character player = c.getPlayer(); ThreadManager.getInstance().newTask(() -> { diff --git a/src/main/java/client/command/commands/gm6/ServerRemoveChannelCommand.java b/src/main/java/client/command/commands/gm6/ServerRemoveChannelCommand.java index e005140327..e2f5b5949a 100644 --- a/src/main/java/client/command/commands/gm6/ServerRemoveChannelCommand.java +++ b/src/main/java/client/command/commands/gm6/ServerRemoveChannelCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm6; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import server.ThreadManager; @@ -35,7 +36,7 @@ public class ServerRemoveChannelCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { final Character player = c.getPlayer(); if (params.length < 1) { diff --git a/src/main/java/client/command/commands/gm6/ServerRemoveWorldCommand.java b/src/main/java/client/command/commands/gm6/ServerRemoveWorldCommand.java index 522d891c63..155de40be6 100644 --- a/src/main/java/client/command/commands/gm6/ServerRemoveWorldCommand.java +++ b/src/main/java/client/command/commands/gm6/ServerRemoveWorldCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm6; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import server.ThreadManager; @@ -35,7 +36,7 @@ public class ServerRemoveWorldCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { final Character player = c.getPlayer(); final int rwid = Server.getInstance().getWorldsSize() - 1; diff --git a/src/main/java/client/command/commands/gm6/SetGmLevelCommand.java b/src/main/java/client/command/commands/gm6/SetGmLevelCommand.java index 9387ac0cb8..cf06dc9359 100644 --- a/src/main/java/client/command/commands/gm6/SetGmLevelCommand.java +++ b/src/main/java/client/command/commands/gm6/SetGmLevelCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm6; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; public class SetGmLevelCommand extends Command { { @@ -33,7 +34,7 @@ public class SetGmLevelCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 2) { player.yellowMessage("Syntax: !setgmlevel "); diff --git a/src/main/java/client/command/commands/gm6/ShutdownCommand.java b/src/main/java/client/command/commands/gm6/ShutdownCommand.java index ad575d29d4..5d73047058 100644 --- a/src/main/java/client/command/commands/gm6/ShutdownCommand.java +++ b/src/main/java/client/command/commands/gm6/ShutdownCommand.java @@ -26,6 +26,7 @@ package client.command.commands.gm6; import client.Character; import client.Client; import client.command.Command; +import client.command.CommandContext; import net.server.Server; import net.server.world.World; import server.TimerManager; @@ -38,7 +39,7 @@ public class ShutdownCommand extends Command { } @Override - public void execute(Client c, String[] params) { + public void execute(Client c, String[] params, CommandContext ctx) { Character player = c.getPlayer(); if (params.length < 1) { player.yellowMessage("Syntax: !shutdown [