Pass CommandContext to commands
CommandContext is the carrier of dependencies. Currently, it only carries a DropProvider, but it will grow bit by bit as more static singletons and other similar structures get refactored.
This commit is contained in:
@@ -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 <info|now>");
|
||||
return;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 = "";
|
||||
|
||||
@@ -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.",
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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() + ":");
|
||||
|
||||
@@ -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<Pair<String, Integer>> worldRanking = Server.getInstance().getWorldPlayerRanking(player.getWorld());
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 <map name>#k. Available areas:\r\n\r\n#rTowns:#k\r\n" + GOTO_TOWNS_INFO;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 <monster name>");
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 <item name>");
|
||||
|
||||
@@ -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 [<playername>] <newap>");
|
||||
|
||||
@@ -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]);
|
||||
|
||||
@@ -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 <buffid>");
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 <all, equip, use, setup, etc or cash.>");
|
||||
|
||||
@@ -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 <playername>");
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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 <type> <query>");
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 <playername> [<minutes>]");
|
||||
|
||||
@@ -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]);
|
||||
|
||||
@@ -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 <newlevel>");
|
||||
|
||||
@@ -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 <newlevel>");
|
||||
|
||||
@@ -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<MapObject> items = c.getPlayer().getMap().getMapObjectsInRange(c.getPlayer().getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapObjectType.ITEM));
|
||||
for (MapObject item : items) {
|
||||
MapItem mapItem = (MapItem) item;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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 <playername>");
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 <type> <name>");
|
||||
|
||||
@@ -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 <newlevel>");
|
||||
|
||||
@@ -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 <newstat>");
|
||||
|
||||
@@ -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 [<playername>] <newsp>");
|
||||
|
||||
@@ -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 <playername>");
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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 <playername>");
|
||||
|
||||
@@ -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 <mapid>");
|
||||
|
||||
@@ -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 <mapid>");
|
||||
|
||||
@@ -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 <mapid>");
|
||||
|
||||
@@ -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<Character> chars = new HashSet<>();
|
||||
|
||||
@@ -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 <IGN> <Reason> (Please be descriptive)");
|
||||
|
||||
@@ -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") + ".");
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 <portalid>");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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.");
|
||||
|
||||
@@ -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<Expedition> expeds = ch.getExpeditions();
|
||||
|
||||
@@ -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 [<playername>] <faceid>");
|
||||
|
||||
@@ -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 <playername> <gainfame>");
|
||||
|
||||
@@ -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 <on/off>");
|
||||
|
||||
@@ -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 [<playername>] <gainmeso>");
|
||||
|
||||
@@ -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] [<playername>] <gainnx>");
|
||||
|
||||
@@ -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 <playername> <gainrewardpoint>");
|
||||
|
||||
@@ -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 <playername> <gainvotepoint>");
|
||||
|
||||
@@ -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 [<playername>] <hairid>");
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 <ign>");
|
||||
|
||||
@@ -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.");
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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<MapObject> monsters = map.getMapObjectsInRange(player.getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapObjectType.MONSTER));
|
||||
|
||||
@@ -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 <playername>");
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 <ign>");
|
||||
|
||||
@@ -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.");
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user