Rename and clean up MapleCharacter
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
@@ -42,16 +42,16 @@ public class BanCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 2) {
|
||||
player.yellowMessage("Syntax: !ban <IGN> <Reason> (Please be descriptive)");
|
||||
return;
|
||||
}
|
||||
String ign = params[0];
|
||||
String reason = joinStringFrom(params, 1);
|
||||
MapleCharacter target = c.getChannelServer().getPlayerStorage().getCharacterByName(ign);
|
||||
Character target = c.getChannelServer().getPlayerStorage().getCharacterByName(ign);
|
||||
if (target != null) {
|
||||
String readableTargetName = MapleCharacter.makeMapleReadable(target.getName());
|
||||
String readableTargetName = Character.makeMapleReadable(target.getName());
|
||||
String ip = target.getClient().getRemoteAddress();
|
||||
//Ban ip
|
||||
try (Connection con = DatabaseConnection.getConnection()) {
|
||||
@@ -74,10 +74,10 @@ public class BanCommand extends Command {
|
||||
target.yellowMessage("You have been banned by #b" + c.getPlayer().getName() + " #k.");
|
||||
target.yellowMessage("Reason: " + reason);
|
||||
c.sendPacket(PacketCreator.getGMEffect(4, (byte) 0));
|
||||
final MapleCharacter rip = target;
|
||||
final Character rip = target;
|
||||
TimerManager.getInstance().schedule(() -> rip.getClient().disconnect(false, false), 5000); //5 Seconds
|
||||
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[RIP]: " + ign + " has been banned."));
|
||||
} else if (MapleCharacter.ban(ign, reason, false)) {
|
||||
} else if (Character.ban(ign, reason, false)) {
|
||||
c.sendPacket(PacketCreator.getGMEffect(4, (byte) 0));
|
||||
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[RIP]: " + ign + " has been banned."));
|
||||
} else {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ChatCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
player.toggleWhiteChat();
|
||||
player.message("Your chat is now " + (player.getWhiteChat() ? " white" : "normal") + ".");
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.BuffStat;
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -35,8 +35,8 @@ public class CheckDmgCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
Character player = c.getPlayer();
|
||||
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim != null) {
|
||||
int maxBase = victim.calculateMaxBaseDamage(victim.getTotalWatk());
|
||||
Integer watkBuff = victim.getBuffedValue(BuffStat.WATK);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ClosePortalCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !closeportal <portalid>");
|
||||
return;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.MapleDisease;
|
||||
import client.command.Command;
|
||||
@@ -41,7 +41,7 @@ public class DebuffCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !debuff SLOW|SEDUCE|ZOMBIFY|CONFUSE|STUN|POISON|SEAL|DARKNESS|WEAKEN|CURSE");
|
||||
return;
|
||||
@@ -108,7 +108,7 @@ public class DebuffCommand extends Command {
|
||||
}
|
||||
|
||||
for (MapleMapObject mmo : player.getMap().getMapObjectsInRange(player.getPosition(), 777777.7, Arrays.asList(MapleMapObjectType.PLAYER))) {
|
||||
MapleCharacter chr = (MapleCharacter) mmo;
|
||||
Character chr = (Character) mmo;
|
||||
|
||||
if (chr.getId() != player.getId()) {
|
||||
chr.giveDebuff(disease, skill);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class EndEventCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
c.getChannelServer().setEvent(null);
|
||||
player.dropMessage(5, "You have ended the event. No more players may join.");
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
@@ -40,7 +40,7 @@ public class ExpedsCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
for (Channel ch : Server.getInstance().getChannelsFromWorld(c.getWorld())) {
|
||||
List<MapleExpedition> expeds = ch.getExpeditions();
|
||||
if (expeds.isEmpty()) {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.MapleStat;
|
||||
import client.command.Command;
|
||||
@@ -37,7 +37,7 @@ public class FaceCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !face [<playername>] <faceid>");
|
||||
return;
|
||||
@@ -60,7 +60,7 @@ public class FaceCommand extends Command {
|
||||
player.yellowMessage("Face id '" + params[1] + "' does not exist.");
|
||||
}
|
||||
|
||||
MapleCharacter victim = c.getChannelServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
Character victim = c.getChannelServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim == null) {
|
||||
victim.setFace(itemId);
|
||||
victim.updateSingleStat(MapleStat.FACE, itemId);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.MapleStat;
|
||||
import client.command.Command;
|
||||
@@ -35,13 +35,13 @@ public class FameCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 2) {
|
||||
player.yellowMessage("Syntax: !fame <playername> <gainfame>");
|
||||
return;
|
||||
}
|
||||
|
||||
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim != null) {
|
||||
victim.setFame(Integer.parseInt(params[1]));
|
||||
victim.updateSingleStat(MapleStat.FAME, victim.getFame());
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
@@ -35,7 +35,7 @@ public class FlyCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) { // fly option will become available for any character of that account
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !fly <on/off>");
|
||||
return;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class GiveMesosCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !givems [<playername>] <gainmeso>");
|
||||
return;
|
||||
@@ -66,7 +66,7 @@ public class GiveMesosCommand extends Command {
|
||||
}
|
||||
}
|
||||
|
||||
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(recv_);
|
||||
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(recv_);
|
||||
if (victim != null) {
|
||||
victim.gainMeso((int) mesos_, true);
|
||||
player.message("MESO given.");
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class GiveNxCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !givenx [nx, mp, np] [<playername>] <gainnx>");
|
||||
return;
|
||||
@@ -72,7 +72,7 @@ public class GiveNxCommand extends Command {
|
||||
value = Integer.parseInt(params[0]);
|
||||
}
|
||||
|
||||
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(recv);
|
||||
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(recv);
|
||||
if (victim != null) {
|
||||
victim.getCashShop().gainCash(type, value);
|
||||
player.message(typeStr.toUpperCase() + " given.");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -11,13 +11,13 @@ public class GiveRpCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient client, String[] params) {
|
||||
MapleCharacter player = client.getPlayer();
|
||||
Character player = client.getPlayer();
|
||||
if (params.length < 2) {
|
||||
player.yellowMessage("Syntax: !giverp <playername> <gainrewardpoint>");
|
||||
return;
|
||||
}
|
||||
|
||||
MapleCharacter victim = client.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
Character victim = client.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim != null) {
|
||||
victim.setRewardPoints(victim.getRewardPoints() + Integer.parseInt(params[1]));
|
||||
player.message("RP given. Player " + params[0] + " now has " + victim.getRewardPoints()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,13 +34,13 @@ public class GiveVpCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 2) {
|
||||
player.yellowMessage("Syntax: !givevp <playername> <gainvotepoint>");
|
||||
return;
|
||||
}
|
||||
|
||||
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim != null) {
|
||||
victim.getClient().addVotePoints(Integer.parseInt(params[1]));
|
||||
player.message("VP given.");
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.MapleStat;
|
||||
import client.command.Command;
|
||||
@@ -37,7 +37,7 @@ public class HairCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !hair [<playername>] <hairid>");
|
||||
return;
|
||||
@@ -61,7 +61,7 @@ public class HairCommand extends Command {
|
||||
return;
|
||||
}
|
||||
|
||||
MapleCharacter victim = c.getChannelServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
Character victim = c.getChannelServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim != null) {
|
||||
victim.setHair(itemId);
|
||||
victim.updateSingleStat(MapleStat.HAIR, itemId);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,8 +34,8 @@ public class HealMapCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
for (MapleCharacter mch : player.getMap().getCharacters()) {
|
||||
Character player = c.getPlayer();
|
||||
for (Character mch : player.getMap().getCharacters()) {
|
||||
if (mch != null) {
|
||||
mch.healHpMp();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,8 +34,8 @@ public class HealPersonCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
Character player = c.getPlayer();
|
||||
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim != null) {
|
||||
victim.healHpMp();
|
||||
} else {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,8 +34,8 @@ public class HpMpCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
MapleCharacter victim = player;
|
||||
Character player = c.getPlayer();
|
||||
Character victim = player;
|
||||
int statUpdate = 1;
|
||||
|
||||
if (params.length == 2) {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,8 +34,8 @@ public class HurtCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
Character player = c.getPlayer();
|
||||
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim != null) {
|
||||
victim.updateHp(1);
|
||||
} else {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.packet.logging.MapleLogger;
|
||||
@@ -37,12 +37,12 @@ public class IgnoreCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !ignore <ign>");
|
||||
return;
|
||||
}
|
||||
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim == null) {
|
||||
player.message("Player '" + params[0] + "' could not be found on this world.");
|
||||
return;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.packet.logging.MapleLogger;
|
||||
@@ -35,9 +35,9 @@ public class IgnoredCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
for (Integer cid : MapleLogger.ignored) {
|
||||
player.yellowMessage(MapleCharacter.getNameById(cid) + " is being ignored.");
|
||||
player.yellowMessage(Character.getNameById(cid) + " is being ignored.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,9 +34,9 @@ public class InMapCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
String st = "";
|
||||
for (MapleCharacter chr : player.getMap().getCharacters()) {
|
||||
for (Character chr : player.getMap().getCharacters()) {
|
||||
st += chr.getName() + " ";
|
||||
}
|
||||
player.message(st);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import server.life.MapleMonster;
|
||||
@@ -41,7 +41,7 @@ public class KillAllCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
MapleMap map = player.getMap();
|
||||
List<MapleMapObject> monsters = map.getMapObjectsInRange(player.getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.MONSTER));
|
||||
int count = 0;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
@@ -36,13 +36,13 @@ public class KillCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !kill <playername>");
|
||||
return;
|
||||
}
|
||||
|
||||
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim != null) {
|
||||
victim.updateHpMp(0);
|
||||
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.serverNotice(5, player.getName() + " used !kill on " + victim.getName()));
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,8 +34,8 @@ public class KillMapCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
for (MapleCharacter mch : player.getMap().getCharacters()) {
|
||||
Character player = c.getPlayer();
|
||||
for (Character mch : player.getMap().getCharacters()) {
|
||||
mch.updateHp(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import tools.PacketCreator;
|
||||
@@ -35,7 +35,7 @@ public class MaxEnergyCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
c.getPlayer().setDojoEnergy(10000);
|
||||
c.sendPacket(PacketCreator.getEnergy("energy", 10000));
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,8 +34,8 @@ public class MaxHpMpCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
MapleCharacter victim = player;
|
||||
Character player = c.getPlayer();
|
||||
Character victim = player;
|
||||
|
||||
int statUpdate = 1;
|
||||
if (params.length >= 2) {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.packet.logging.MapleLogger;
|
||||
@@ -37,12 +37,12 @@ public class MonitorCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !monitor <ign>");
|
||||
return;
|
||||
}
|
||||
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim == null) {
|
||||
player.message("Player '" + params[0] + "' could not be found on this world.");
|
||||
return;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.packet.logging.MapleLogger;
|
||||
@@ -35,9 +35,9 @@ public class MonitorsCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
for (Integer cid : MapleLogger.monitored) {
|
||||
player.yellowMessage(MapleCharacter.getNameById(cid) + " is being monitored.");
|
||||
player.yellowMessage(Character.getNameById(cid) + " is being monitored.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import constants.game.GameConstants;
|
||||
@@ -46,7 +46,7 @@ public class MusicCommand extends Command {
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
String sendMsg = "";
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class MuteMapCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (player.getMap().isMuted()) {
|
||||
player.getMap().setMuted(false);
|
||||
player.dropMessage(5, "The map you are in has been un-muted.");
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class NightCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
player.getMap().broadcastNightEffect();
|
||||
player.yellowMessage("Done.");
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
@@ -36,7 +36,7 @@ public class NoticeCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[Notice] " + player.getLastCommandMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import server.life.MapleLifeFactory;
|
||||
@@ -37,7 +37,7 @@ public class NpcCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !npc <npcid>");
|
||||
return;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
@@ -36,15 +36,15 @@ public class OnlineTwoCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
int total = 0;
|
||||
for (Channel ch : Server.getInstance().getChannelsFromWorld(player.getWorld())) {
|
||||
int size = ch.getPlayerStorage().getAllCharacters().size();
|
||||
total += size;
|
||||
String s = "(Channel " + ch.getId() + " Online: " + size + ") : ";
|
||||
if (ch.getPlayerStorage().getAllCharacters().size() < 50) {
|
||||
for (MapleCharacter chr : ch.getPlayerStorage().getAllCharacters()) {
|
||||
s += MapleCharacter.makeMapleReadable(chr.getName()) + ", ";
|
||||
for (Character chr : ch.getPlayerStorage().getAllCharacters()) {
|
||||
s += Character.makeMapleReadable(chr.getName()) + ", ";
|
||||
}
|
||||
player.dropMessage(6, s.substring(0, s.length() - 2));
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class OpenPortalCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !openportal <portalid>");
|
||||
return;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import io.netty.buffer.Unpooled;
|
||||
@@ -46,7 +46,7 @@ public class PeCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
String packet = "";
|
||||
try {
|
||||
InputStreamReader is = new FileReader("pe.txt");
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class PosCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
float xpos = player.getPosition().x;
|
||||
float ypos = player.getPosition().y;
|
||||
float fh = player.getMap().getFootholds().findBelow(player.getPosition()).getId();
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import server.quest.MapleQuest;
|
||||
@@ -35,7 +35,7 @@ public class QuestCompleteCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
|
||||
if (params.length < 1){
|
||||
player.yellowMessage("Syntax: !completequest <questid>");
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import server.quest.MapleQuest;
|
||||
@@ -35,7 +35,7 @@ public class QuestResetCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
|
||||
if (params.length < 1){
|
||||
player.yellowMessage("Syntax: !resetquest <questid>");
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import server.quest.MapleQuest;
|
||||
@@ -35,7 +35,7 @@ public class QuestStartCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
|
||||
if (params.length < 1){
|
||||
player.yellowMessage("Syntax: !startquest <questid>");
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import server.life.MapleMonsterInformationProvider;
|
||||
@@ -35,7 +35,7 @@ public class ReloadDropsCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
MapleMonsterInformationProvider.getInstance().clearDrops();
|
||||
player.dropMessage(5, "Reloaded Drops");
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
@@ -36,7 +36,7 @@ public class ReloadEventsCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
for (Channel ch : Server.getInstance().getAllChannels()) {
|
||||
ch.reloadEventScriptManager();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import server.maps.MapleMap;
|
||||
@@ -37,13 +37,13 @@ public class ReloadMapCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
MapleMap newMap = c.getChannelServer().getMapFactory().resetMap(player.getMapId());
|
||||
int callerid = c.getPlayer().getId();
|
||||
|
||||
Collection<MapleCharacter> characters = player.getMap().getAllPlayers();
|
||||
Collection<Character> characters = player.getMap().getAllPlayers();
|
||||
|
||||
for (MapleCharacter chr : characters) {
|
||||
for (Character chr : characters) {
|
||||
chr.saveLocationOnWarp();
|
||||
chr.changeMap(newMap);
|
||||
if (chr.getId() != callerid)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import scripting.portal.PortalScriptManager;
|
||||
@@ -35,7 +35,7 @@ public class ReloadPortalsCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
PortalScriptManager.getInstance().reloadPortalScripts();
|
||||
player.dropMessage(5, "Reloaded Portals");
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
@@ -36,7 +36,7 @@ public class RipCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[RIP]: " + joinStringFrom(params, 1)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import client.inventory.Item;
|
||||
@@ -37,7 +37,7 @@ public class SeedCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (player.getMapId() != 910010000) {
|
||||
player.yellowMessage("This command can only be used in HPQ.");
|
||||
return;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import server.life.MapleLifeFactory;
|
||||
@@ -36,7 +36,7 @@ public class SpawnCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !spawn <mobid> [<mobqty>]");
|
||||
return;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
@@ -37,7 +37,7 @@ public class StartEventCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
int players = 50;
|
||||
if (params.length > 1)
|
||||
players = Integer.parseInt(params[0]);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import tools.PacketCreator;
|
||||
@@ -35,20 +35,20 @@ public class TimerAllCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !timerall <seconds>|remove");
|
||||
return;
|
||||
}
|
||||
|
||||
if (params[0].equalsIgnoreCase("remove")) {
|
||||
for (MapleCharacter victim : player.getWorldServer().getPlayerStorage().getAllCharacters()) {
|
||||
for (Character victim : player.getWorldServer().getPlayerStorage().getAllCharacters()) {
|
||||
victim.sendPacket(PacketCreator.removeClock());
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
int seconds = Integer.parseInt(params[0]);
|
||||
for (MapleCharacter victim : player.getWorldServer().getPlayerStorage().getAllCharacters()) {
|
||||
for (Character victim : player.getWorldServer().getPlayerStorage().getAllCharacters()) {
|
||||
victim.sendPacket(PacketCreator.getClock(seconds));
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import tools.PacketCreator;
|
||||
@@ -35,13 +35,13 @@ public class TimerCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 2) {
|
||||
player.yellowMessage("Syntax: !timer <playername> <seconds>|remove");
|
||||
return;
|
||||
}
|
||||
|
||||
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
Character victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim != null) {
|
||||
if (params[1].equalsIgnoreCase("remove")) {
|
||||
victim.sendPacket(PacketCreator.removeClock());
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import tools.PacketCreator;
|
||||
@@ -35,20 +35,20 @@ public class TimerMapCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !timermap <seconds>|remove");
|
||||
return;
|
||||
}
|
||||
|
||||
if (params[0].equalsIgnoreCase("remove")) {
|
||||
for (MapleCharacter victim : player.getMap().getCharacters()) {
|
||||
for (Character victim : player.getMap().getCharacters()) {
|
||||
victim.sendPacket(PacketCreator.removeClock());
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
int seconds = Integer.parseInt(params[0]);
|
||||
for (MapleCharacter victim : player.getMap().getCharacters()) {
|
||||
for (Character victim : player.getMap().getCharacters()) {
|
||||
victim.sendPacket(PacketCreator.getClock(seconds));
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
@@ -35,7 +35,7 @@ public class ToggleCouponCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !togglecoupon <itemid>");
|
||||
return;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
package client.command.commands.gm3;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import client.Character;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import tools.DatabaseConnection;
|
||||
@@ -38,14 +38,14 @@ public class UnBanCommand extends Command {
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Character player = c.getPlayer();
|
||||
if (params.length < 1) {
|
||||
player.yellowMessage("Syntax: !unban <playername>");
|
||||
return;
|
||||
}
|
||||
|
||||
try (Connection con = DatabaseConnection.getConnection()) {
|
||||
int aid = MapleCharacter.getAccountIdByName(params[0]);
|
||||
int aid = Character.getAccountIdByName(params[0]);
|
||||
|
||||
try (PreparedStatement p = con.prepareStatement("UPDATE accounts SET banned = -1 WHERE id = " + aid)) {
|
||||
p.executeUpdate();
|
||||
|
||||
Reference in New Issue
Block a user