Rename and clean up MapleClient

This commit is contained in:
P0nk
2021-09-09 21:13:48 +02:00
parent da8837710a
commit b07e6799dc
425 changed files with 1110 additions and 1109 deletions

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import config.YamlConfig;
@@ -34,7 +34,7 @@ public class ApCommand 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) {
player.yellowMessage("Syntax: !ap [<playername>] <newap>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import net.server.Server;
import server.life.MapleLifeFactory;
@@ -36,7 +36,7 @@ public class BombCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length > 0) {
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.Skill;
import client.SkillFactory;
import client.command.Command;
@@ -35,7 +35,7 @@ public class BuffCommand 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) {
player.yellowMessage("Syntax: !buff <buffid>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.SkillFactory;
import client.command.Command;
@@ -34,7 +34,7 @@ public class BuffMapCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
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);

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class ClearDropsCommand extends Command {
@@ -33,7 +33,7 @@ public class ClearDropsCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
player.getMap().clearDrops(player);
player.dropMessage(5, "Cleared dropped items");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.maps.SavedLocationType;
@@ -34,7 +34,7 @@ public class ClearSavedLocationsCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer(), victim;
if (params.length > 0) {

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import client.inventory.InventoryType;
import client.inventory.Item;
@@ -36,7 +36,7 @@ public class ClearSlotCommand 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) {
player.yellowMessage("Syntax: !clearslot <all, equip, use, setup, etc or cash.>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class DcCommand extends Command {
@@ -33,7 +33,7 @@ public class DcCommand 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) {
player.yellowMessage("Syntax: !dc <playername>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.SkillFactory;
import client.command.Command;
@@ -34,7 +34,7 @@ public class EmpowerMeCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
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) {

View File

@@ -19,7 +19,7 @@
*/
package client.command.commands.gm2;
import client.MapleClient;
import client.Client;
import client.command.Command;
/**
@@ -32,7 +32,7 @@ public class GachaListCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
c.getAbstractPlayerInteraction().openNpc(10000, "gachaponInfo");
}
}

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.MapleShopFactory;
@@ -33,7 +33,7 @@ public class GmShopCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
MapleShopFactory.getInstance().getShop(1337).sendShop(c);
}
}

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class HealCommand extends Command {
@@ -33,7 +33,7 @@ public class HealCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
player.healHpMp();
}

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.SkillFactory;
import client.command.Command;
@@ -34,7 +34,7 @@ public class HideCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
SkillFactory.getSkill(9101004).getEffect(SkillFactory.getSkill(9101004).getMaxLevel()).applyTo(player);

View File

@@ -1,7 +1,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.ThreadManager;
import tools.exceptions.IdTypeNotSupportedException;
@@ -30,7 +30,7 @@ public class IdCommand extends Command {
}
@Override
public void execute(MapleClient client, final String[] params) {
public void execute(Client client, final String[] params) {
final Character player = client.getPlayer();
if (params.length < 2) {
player.yellowMessage("Syntax: !id <type> <query>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import client.inventory.Pet;
import client.inventory.manipulator.InventoryManipulator;
@@ -38,7 +38,7 @@ public class ItemCommand 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) {

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import client.inventory.InventoryType;
import client.inventory.Item;
@@ -39,7 +39,7 @@ public class ItemDropCommand 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) {

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.maps.MapleMap;
import server.maps.MaplePortal;
@@ -35,7 +35,7 @@ public class JailCommand 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) {
player.yellowMessage("Syntax: !jail <playername> [<minutes>]");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.MapleJob;
import client.command.Command;
@@ -34,7 +34,7 @@ public class JobCommand 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) {
int jobid = Integer.parseInt(params[0]);

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import config.YamlConfig;
@@ -34,7 +34,7 @@ public class LevelCommand 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) {
player.yellowMessage("Syntax: !level <newlevel>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class LevelProCommand extends Command {
@@ -33,7 +33,7 @@ public class LevelProCommand 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) {
player.yellowMessage("Syntax: !levelpro <newlevel>");

View File

@@ -23,14 +23,15 @@
*/
package client.command.commands.gm2;
import client.MapleClient;
import client.Client;
import client.command.Command;
import java.util.Arrays;
import java.util.List;
import server.maps.MapleMapItem;
import server.maps.MapleMapObject;
import server.maps.MapleMapObjectType;
import java.util.Arrays;
import java.util.List;
public class LootCommand extends Command {
{
@@ -38,7 +39,7 @@ public class LootCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
List<MapleMapObject> items = c.getPlayer().getMap().getMapObjectsInRange(c.getPlayer().getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.ITEM));
for (MapleMapObject item : items) {
MapleMapItem mapItem = (MapleMapItem) item;

View File

@@ -36,7 +36,7 @@ public class MaxSkillCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
for (MapleData skill_ : MapleDataProviderFactory.getDataProvider(WZFiles.STRING).getData("Skill.img").getChildren()) {
try {

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.MapleStat;
import client.command.Command;
import config.YamlConfig;
@@ -35,7 +35,7 @@ public class MaxStatCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
player.loseExp(player.getExp(), false, false);
player.setLevel(255);

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.maps.MapleMap;
@@ -34,7 +34,7 @@ public class ReachCommand 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) {
player.yellowMessage("Syntax: !reach <playername>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import client.inventory.InventoryType;
import client.inventory.Item;
@@ -37,7 +37,7 @@ public class RechargeCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
for (Item torecharge : c.getPlayer().getInventory(InventoryType.USE).list()) {

View File

@@ -36,7 +36,7 @@ public class ResetSkillCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
for (MapleData skill_ : MapleDataProviderFactory.getDataProvider(WZFiles.STRING).getData("Skill.img").getChildren()) {
try {

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import provider.MapleData;
import provider.MapleDataProvider;
@@ -52,7 +52,7 @@ public class SearchCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
if (params.length < 2) {
player.yellowMessage("Syntax: !search <type> <name>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class SetSlotCommand extends Command {
@@ -33,7 +33,7 @@ public class SetSlotCommand 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) {
player.yellowMessage("Syntax: !setslot <newlevel>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class SetStatCommand extends Command {
@@ -33,7 +33,7 @@ public class SetStatCommand 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) {
player.yellowMessage("Syntax: !setstat <newstat>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import config.YamlConfig;
@@ -34,7 +34,7 @@ public class SpCommand 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) {
player.yellowMessage("Syntax: !sp [<playername>] <newsp>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import net.server.Server;
import net.server.channel.Channel;
@@ -36,7 +36,7 @@ public class SummonCommand 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) {
player.yellowMessage("Syntax: !warphere <playername>");

View File

@@ -23,7 +23,7 @@
*/
package client.command.commands.gm2;
import client.MapleClient;
import client.Client;
import client.command.Command;
import tools.PacketCreator;
@@ -33,7 +33,7 @@ public class UnBugCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
c.getPlayer().getMap().broadcastMessage(PacketCreator.enableActions());
}
}

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.SkillFactory;
import client.command.Command;
@@ -34,7 +34,7 @@ public class UnHideCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
SkillFactory.getSkill(9101004).getEffect(SkillFactory.getSkill(9101004).getMaxLevel()).applyTo(player);

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
public class UnJailCommand extends Command {
@@ -33,7 +33,7 @@ public class UnJailCommand 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) {
player.yellowMessage("Syntax: !unjail <playername>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.maps.MapleMap;
@@ -37,7 +37,7 @@ public class WarpAreaCommand 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) {
player.yellowMessage("Syntax: !warparea <mapid>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.maps.FieldLimit;
import server.maps.MapleMap;
@@ -36,7 +36,7 @@ public class WarpCommand 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) {
player.yellowMessage("Syntax: !warp <mapid>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.maps.MapleMap;
@@ -36,7 +36,7 @@ public class WarpMapCommand 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) {
player.yellowMessage("Syntax: !warpmap <mapid>");

View File

@@ -24,7 +24,7 @@
package client.command.commands.gm2;
import client.Character;
import client.MapleClient;
import client.Client;
import client.command.Command;
import server.life.MapleMonster;
import server.life.MapleNPC;
@@ -39,7 +39,7 @@ public class WhereaMiCommand extends Command {
}
@Override
public void execute(MapleClient c, String[] params) {
public void execute(Client c, String[] params) {
Character player = c.getPlayer();
HashSet<Character> chars = new HashSet<>();