Remove "Maple" prefix from MaplePacketCreator name
This commit is contained in:
@@ -29,7 +29,7 @@ import client.command.Command;
|
||||
import net.server.Server;
|
||||
import server.TimerManager;
|
||||
import tools.DatabaseConnection;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
@@ -73,15 +73,15 @@ public class BanCommand extends Command {
|
||||
target.ban(reason);
|
||||
target.yellowMessage("You have been banned by #b" + c.getPlayer().getName() + " #k.");
|
||||
target.yellowMessage("Reason: " + reason);
|
||||
c.announce(MaplePacketCreator.getGMEffect(4, (byte) 0));
|
||||
c.announce(PacketCreator.getGMEffect(4, (byte) 0));
|
||||
final MapleCharacter rip = target;
|
||||
TimerManager.getInstance().schedule(() -> rip.getClient().disconnect(false, false), 5000); //5 Seconds
|
||||
Server.getInstance().broadcastMessage(c.getWorld(), MaplePacketCreator.serverNotice(6, "[RIP]: " + ign + " has been banned."));
|
||||
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[RIP]: " + ign + " has been banned."));
|
||||
} else if (MapleCharacter.ban(ign, reason, false)) {
|
||||
c.announce(MaplePacketCreator.getGMEffect(4, (byte) 0));
|
||||
Server.getInstance().broadcastMessage(c.getWorld(), MaplePacketCreator.serverNotice(6, "[RIP]: " + ign + " has been banned."));
|
||||
c.announce(PacketCreator.getGMEffect(4, (byte) 0));
|
||||
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[RIP]: " + ign + " has been banned."));
|
||||
} else {
|
||||
c.announce(MaplePacketCreator.getGMEffect(6, (byte) 1));
|
||||
c.announce(PacketCreator.getGMEffect(6, (byte) 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,9 +26,9 @@ package client.command.commands.gm3;
|
||||
import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
import net.packet.logging.MapleLogger;
|
||||
import tools.MaplePacketCreator;
|
||||
import net.server.Server;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public class IgnoreCommand extends Command {
|
||||
{
|
||||
@@ -55,7 +55,7 @@ public class IgnoreCommand extends Command {
|
||||
}
|
||||
player.yellowMessage(victim.getName() + " is " + (!monitored_ ? "now being ignored." : "no longer being ignored."));
|
||||
String message_ = player.getName() + (!monitored_ ? " has started ignoring " : " has stopped ignoring ") + victim.getName() + ".";
|
||||
Server.getInstance().broadcastGMMessage(c.getWorld(), MaplePacketCreator.serverNotice(5, message_));
|
||||
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.serverNotice(5, message_));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public class KillCommand extends Command {
|
||||
{
|
||||
@@ -45,7 +45,7 @@ public class KillCommand extends Command {
|
||||
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim != null) {
|
||||
victim.updateHpMp(0);
|
||||
Server.getInstance().broadcastGMMessage(c.getWorld(), MaplePacketCreator.serverNotice(5, player.getName() + " used !kill on " + victim.getName()));
|
||||
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.serverNotice(5, player.getName() + " used !kill on " + victim.getName()));
|
||||
} else {
|
||||
player.message("Player '" + params[0] + "' could not be found.");
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ package client.command.commands.gm3;
|
||||
import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public class MaxEnergyCommand extends Command {
|
||||
{
|
||||
@@ -37,6 +37,6 @@ public class MaxEnergyCommand extends Command {
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
c.getPlayer().setDojoEnergy(10000);
|
||||
c.announce(MaplePacketCreator.getEnergy("energy", 10000));
|
||||
c.announce(PacketCreator.getEnergy("energy", 10000));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,9 +26,9 @@ package client.command.commands.gm3;
|
||||
import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
import net.packet.logging.MapleLogger;
|
||||
import tools.MaplePacketCreator;
|
||||
import net.server.Server;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public class MonitorCommand extends Command {
|
||||
{
|
||||
@@ -55,7 +55,7 @@ public class MonitorCommand extends Command {
|
||||
}
|
||||
player.yellowMessage(victim.getId() + " is " + (!monitored ? "now being monitored." : "no longer being monitored."));
|
||||
String message = player.getName() + (!monitored ? " has started monitoring " : " has stopped monitoring ") + victim.getId() + ".";
|
||||
Server.getInstance().broadcastGMMessage(c.getWorld(), MaplePacketCreator.serverNotice(5, message));
|
||||
Server.getInstance().broadcastGMMessage(c.getWorld(), PacketCreator.serverNotice(5, message));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import constants.game.GameConstants;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public class MusicCommand extends Command {
|
||||
{
|
||||
@@ -53,14 +53,14 @@ public class MusicCommand extends Command {
|
||||
sendMsg += "Syntax: #r!music <song>#k\r\n\r\n";
|
||||
sendMsg += getSongList();
|
||||
|
||||
c.announce(MaplePacketCreator.getNPCTalk(1052015, (byte) 0, sendMsg, "00 00", (byte) 0));
|
||||
c.announce(PacketCreator.getNPCTalk(1052015, (byte) 0, sendMsg, "00 00", (byte) 0));
|
||||
return;
|
||||
}
|
||||
|
||||
String song = player.getLastCommandMessage();
|
||||
for (String s : GameConstants.GAME_SONGS) {
|
||||
if (s.equalsIgnoreCase(song)) { // thanks Masterrulax for finding an issue here
|
||||
player.getMap().broadcastMessage(MaplePacketCreator.musicChange(s));
|
||||
player.getMap().broadcastMessage(PacketCreator.musicChange(s));
|
||||
player.yellowMessage("Now playing song " + s + ".");
|
||||
return;
|
||||
}
|
||||
@@ -70,6 +70,6 @@ public class MusicCommand extends Command {
|
||||
sendMsg += "Song not found, please enter a song below.\r\n\r\n";
|
||||
sendMsg += getSongList();
|
||||
|
||||
c.announce(MaplePacketCreator.getNPCTalk(1052015, (byte) 0, sendMsg, "00 00", (byte) 0));
|
||||
c.announce(PacketCreator.getNPCTalk(1052015, (byte) 0, sendMsg, "00 00", (byte) 0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public class NoticeCommand extends Command {
|
||||
{
|
||||
@@ -37,6 +37,6 @@ public class NoticeCommand extends Command {
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Server.getInstance().broadcastMessage(c.getWorld(), MaplePacketCreator.serverNotice(6, "[Notice] " + player.getLastCommandMessage()));
|
||||
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[Notice] " + player.getLastCommandMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import server.life.MapleLifeFactory;
|
||||
import server.life.MapleNPC;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public class NpcCommand extends Command {
|
||||
{
|
||||
@@ -50,7 +50,7 @@ public class NpcCommand extends Command {
|
||||
npc.setRx1(player.getPosition().x - 50);
|
||||
npc.setFh(player.getMap().getFootholds().findBelow(c.getPlayer().getPosition()).getId());
|
||||
player.getMap().addMapObject(npc);
|
||||
player.getMap().broadcastMessage(MaplePacketCreator.spawnNPC(npc));
|
||||
player.getMap().broadcastMessage(PacketCreator.spawnNPC(npc));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public class RipCommand extends Command {
|
||||
{
|
||||
@@ -37,6 +37,6 @@ public class RipCommand extends Command {
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
Server.getInstance().broadcastMessage(c.getWorld(), MaplePacketCreator.serverNotice(6, "[RIP]: " + joinStringFrom(params, 1)));
|
||||
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.serverNotice(6, "[RIP]: " + joinStringFrom(params, 1)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
import server.events.gm.MapleEvent;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public class StartEventCommand extends Command {
|
||||
{
|
||||
@@ -42,14 +42,14 @@ public class StartEventCommand extends Command {
|
||||
if (params.length > 1)
|
||||
players = Integer.parseInt(params[0]);
|
||||
c.getChannelServer().setEvent(new MapleEvent(player.getMapId(), players));
|
||||
Server.getInstance().broadcastMessage(c.getWorld(), MaplePacketCreator.earnTitleMessage(
|
||||
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.earnTitleMessage(
|
||||
"[Event] An event has started on "
|
||||
+ player.getMap().getMapName()
|
||||
+ " and will allow "
|
||||
+ players
|
||||
+ " players to join. Type @joinevent to participate."));
|
||||
Server.getInstance().broadcastMessage(c.getWorld(),
|
||||
MaplePacketCreator.serverNotice(6, "[Event] An event has started on "
|
||||
PacketCreator.serverNotice(6, "[Event] An event has started on "
|
||||
+ player.getMap().getMapName()
|
||||
+ " and will allow "
|
||||
+ players
|
||||
|
||||
@@ -26,7 +26,7 @@ package client.command.commands.gm3;
|
||||
import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public class TimerAllCommand extends Command {
|
||||
{
|
||||
@@ -43,13 +43,13 @@ public class TimerAllCommand extends Command {
|
||||
|
||||
if (params[0].equalsIgnoreCase("remove")) {
|
||||
for (MapleCharacter victim : player.getWorldServer().getPlayerStorage().getAllCharacters()) {
|
||||
victim.announce(MaplePacketCreator.removeClock());
|
||||
victim.announce(PacketCreator.removeClock());
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
int seconds = Integer.parseInt(params[0]);
|
||||
for (MapleCharacter victim : player.getWorldServer().getPlayerStorage().getAllCharacters()) {
|
||||
victim.announce(MaplePacketCreator.getClock(seconds));
|
||||
victim.announce(PacketCreator.getClock(seconds));
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
player.yellowMessage("Syntax: !timerall <seconds>|remove");
|
||||
|
||||
@@ -26,7 +26,7 @@ package client.command.commands.gm3;
|
||||
import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public class TimerCommand extends Command {
|
||||
{
|
||||
@@ -44,10 +44,10 @@ public class TimerCommand extends Command {
|
||||
MapleCharacter victim = c.getWorldServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim != null) {
|
||||
if (params[1].equalsIgnoreCase("remove")) {
|
||||
victim.announce(MaplePacketCreator.removeClock());
|
||||
victim.announce(PacketCreator.removeClock());
|
||||
} else {
|
||||
try {
|
||||
victim.announce(MaplePacketCreator.getClock(Integer.parseInt(params[1])));
|
||||
victim.announce(PacketCreator.getClock(Integer.parseInt(params[1])));
|
||||
} catch (NumberFormatException e) {
|
||||
player.yellowMessage("Syntax: !timer <playername> <seconds>|remove");
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ package client.command.commands.gm3;
|
||||
import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.command.Command;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public class TimerMapCommand extends Command {
|
||||
{
|
||||
@@ -43,13 +43,13 @@ public class TimerMapCommand extends Command {
|
||||
|
||||
if (params[0].equalsIgnoreCase("remove")) {
|
||||
for (MapleCharacter victim : player.getMap().getCharacters()) {
|
||||
victim.announce(MaplePacketCreator.removeClock());
|
||||
victim.announce(PacketCreator.removeClock());
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
int seconds = Integer.parseInt(params[0]);
|
||||
for (MapleCharacter victim : player.getMap().getCharacters()) {
|
||||
victim.announce(MaplePacketCreator.getClock(seconds));
|
||||
victim.announce(PacketCreator.getClock(seconds));
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
player.yellowMessage("Syntax: !timermap <seconds>|remove");
|
||||
|
||||
Reference in New Issue
Block a user