[QoL] Added broadcast message to !startevent command to increase expo… (#414)

* [QoL] Added broadcast message to !startevent command to increase exposure

* Change broadcastmessage to not just GM
This commit is contained in:
Nulliphite
2019-02-28 03:04:27 +10:00
committed by Ronan Lana
parent 02ede93298
commit 0dfd57c4ee

View File

@@ -26,7 +26,9 @@ package client.command.commands.gm3;
import client.command.Command;
import client.MapleClient;
import client.MapleCharacter;
import net.server.Server;
import server.events.gm.MapleEvent;
import tools.MaplePacketCreator;
public class StartEventCommand extends Command {
{
@@ -40,6 +42,16 @@ public class StartEventCommand extends Command {
if (params.length > 1)
players = Integer.parseInt(params[0]);
c.getChannelServer().setEvent(new MapleEvent(player.getMapId(), players));
player.dropMessage(5, "The event has been set on " + player.getMap().getMapName() + " and will allow " + players + " players to join.");
Server.getInstance().broadcastMessage(c.getWorld(), MaplePacketCreator.earnTitleMessage(
"[Event] An event has started on "
+ player.getMap().getMapName()
+ " and will allow "
+ players
+ " players to join. Type @joinevent to participate."));
player.dropMessage(5, "[Event] An event has started on "
+ player.getMap().getMapName()
+ " and will allow "
+ players
+ " players to join.");
}
}