Rename and clean up MapleClient
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import client.processor.action.BuybackProcessor;
|
||||
|
||||
@@ -33,7 +33,7 @@ public class BuyBackCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
if (params.length < 1) {
|
||||
c.getPlayer().yellowMessage("Syntax: @buyback <info|now>");
|
||||
return;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
|
||||
public class ChangeLanguageCommand extends Command {
|
||||
@@ -32,7 +32,7 @@ public class ChangeLanguageCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
if (params.length < 1) {
|
||||
c.getPlayer().yellowMessage("Syntax: !changel <0=ptb, 1=esp, 2=eng>");
|
||||
return;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import scripting.npc.NPCScriptManager;
|
||||
import scripting.quest.QuestScriptManager;
|
||||
@@ -35,7 +35,7 @@ public class DisposeCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
NPCScriptManager.getInstance().dispose(c);
|
||||
QuestScriptManager.getInstance().dispose(c);
|
||||
c.sendPacket(PacketCreator.enableActions());
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import config.YamlConfig;
|
||||
|
||||
@@ -33,7 +33,7 @@ public class DropLimitCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
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);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import net.server.coordinator.login.MapleLoginBypassCoordinator;
|
||||
|
||||
@@ -33,7 +33,7 @@ public class EnableAuthCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
if (c.tryacquireClient()) {
|
||||
try {
|
||||
MapleLoginBypassCoordinator.getInstance().unregisterLoginBypassEntry(c.getHwid(), c.getAccID());
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
|
||||
public class EquipLvCommand extends Command {
|
||||
@@ -32,7 +32,7 @@ public class EquipLvCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
c.getPlayer().showAllEquipFeatures();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import server.MapleItemInformationProvider;
|
||||
import server.gachapon.MapleGachapon;
|
||||
@@ -34,7 +34,7 @@ public class GachaCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
MapleGachapon.Gachapon gacha = null;
|
||||
String search = c.getPlayer().getLastCommandMessage();
|
||||
String gachaName = "";
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
import tools.FilePrinter;
|
||||
@@ -37,7 +37,7 @@ public class GmCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
String[] tips = {
|
||||
"Please only use @gm in emergencies or to report somebody.",
|
||||
"To report a bug or make a suggestion, use the forum.",
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
|
||||
public class HelpCommand extends Command {
|
||||
@@ -32,7 +32,7 @@ public class HelpCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient client, String[] params) {
|
||||
public void execute(Client client, String[] params) {
|
||||
client.getAbstractPlayerInteraction().openNpc(9201143, "commands");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import server.events.gm.MapleEvent;
|
||||
import server.maps.FieldLimit;
|
||||
@@ -35,7 +35,7 @@ public class JoinEventCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
if(!FieldLimit.CANNOTMIGRATE.check(player.getMap().getFieldLimit())) {
|
||||
MapleEvent event = c.getChannelServer().getEvent();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
|
||||
public class LeaveEventCommand extends Command {
|
||||
@@ -33,7 +33,7 @@ public class LeaveEventCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
int returnMap = player.getSavedLocation("EVENT");
|
||||
if(returnMap != -1) {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import config.YamlConfig;
|
||||
import server.maps.MapleMap;
|
||||
@@ -35,7 +35,7 @@ public class MapOwnerClaimCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
if (c.tryacquireClient()) {
|
||||
try {
|
||||
Character chr = c.getPlayer();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
import net.server.channel.Channel;
|
||||
@@ -35,7 +35,7 @@ public class OnlineCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
for (Channel ch : Server.getInstance().getChannelsFromWorld(player.getWorld())) {
|
||||
player.yellowMessage("Players in Channel " + ch.getId() + ":");
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
import net.server.guild.GuildPackets;
|
||||
@@ -38,7 +38,7 @@ public class RanksCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
|
||||
List<Pair<String, Integer>> worldRanking = Server.getInstance().getWorldPlayerRanking(player.getWorld());
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import config.YamlConfig;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class RatesCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
|
||||
// travel rates not applicable since it's intrinsically a server/environment rate rather than a character rate
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
|
||||
public class ReadPointsCommand extends Command {
|
||||
@@ -10,7 +10,7 @@ public class ReadPointsCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient client, String[] params) {
|
||||
public void execute(Client client, String[] params) {
|
||||
|
||||
Character player = client.getPlayer();
|
||||
if (params.length > 2) {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
import tools.FilePrinter;
|
||||
@@ -36,7 +36,7 @@ public class ReportBugCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
|
||||
if (params.length < 1) {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import config.YamlConfig;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ShowRatesCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
String showMsg = "#eEXP RATE#n" + "\r\n";
|
||||
showMsg += "World EXP Rate: #k" + c.getWorldServer().getExpRate() + "x#k" + "\r\n";
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
|
||||
public class StaffCommand extends Command {
|
||||
@@ -32,7 +32,7 @@ public class StaffCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
c.getAbstractPlayerInteraction().openNpc(2010007, "credits");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import config.YamlConfig;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class StatDexCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
int remainingAp = player.getRemainingAp();
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import config.YamlConfig;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class StatIntCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
int remainingAp = player.getRemainingAp();
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import config.YamlConfig;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class StatLukCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
int remainingAp = player.getRemainingAp();
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import config.YamlConfig;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class StatStrCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
int remainingAp = player.getRemainingAp();
|
||||
int amount;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
|
||||
import java.text.DateFormat;
|
||||
@@ -37,7 +37,7 @@ public class TimeCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient client, String[] params) {
|
||||
public void execute(Client client, String[] params) {
|
||||
DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
|
||||
dateFormat.setTimeZone(TimeZone.getDefault());
|
||||
client.getPlayer().yellowMessage("Cosmic Server Time: " + dateFormat.format(new Date()));
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
|
||||
public class ToggleExpCommand extends Command {
|
||||
@@ -32,7 +32,7 @@ public class ToggleExpCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
if (c.tryacquireClient()) {
|
||||
try {
|
||||
c.getPlayer().toggleExpGain(); // Vcoc's idea
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm0;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
|
||||
@@ -33,7 +33,7 @@ public class UptimeCommand extends Command {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
public void execute(Client c, String[] params) {
|
||||
long milliseconds = System.currentTimeMillis() - Server.uptime;
|
||||
int seconds = (int) (milliseconds / 1000) % 60 ;
|
||||
int minutes = (int) ((milliseconds / (1000*60)) % 60);
|
||||
|
||||
Reference in New Issue
Block a user