Fix /tbm-disable|enable-all to notify all players

This commit is contained in:
Stephen Seo 2018-10-17 13:27:55 +09:00
parent debc4a70ba
commit 6e7cd0177a
2 changed files with 4 additions and 2 deletions

View file

@ -49,11 +49,12 @@ public class CommandTBMDisableAll extends CommandBase
if(senderPlayer != null)
{
TurnBasedMinecraftMod.logger.info(senderPlayer.getName() + " disabled turn-based-combat for everyone");
TurnBasedMinecraftMod.NWINSTANCE.sendTo(new PacketGeneralMessage("You disabled turn-based-combat for everyone"), senderPlayer);
TurnBasedMinecraftMod.NWINSTANCE.sendToAll(new PacketGeneralMessage(senderPlayer.getName() + " disabled turn-based-battle for everyone"));
}
else
{
TurnBasedMinecraftMod.logger.info("An admin disabled turn-based-combat for everyone");
TurnBasedMinecraftMod.NWINSTANCE.sendToAll(new PacketGeneralMessage("An admin disabled turn-based-battle for everyone"));
}
}

View file

@ -46,11 +46,12 @@ public class CommandTBMEnableAll extends CommandBase
if(senderPlayer != null)
{
TurnBasedMinecraftMod.logger.info(senderPlayer.getName() + " enabled turn-based-combat for everyone");
TurnBasedMinecraftMod.NWINSTANCE.sendTo(new PacketGeneralMessage("You enabled turn-based-combat for everyone"), senderPlayer);
TurnBasedMinecraftMod.NWINSTANCE.sendToAll(new PacketGeneralMessage(senderPlayer.getName() + " enabled turn-based-combat for everyone"));
}
else
{
TurnBasedMinecraftMod.logger.info("An admin enabled turn-based-combat for everyone");
TurnBasedMinecraftMod.NWINSTANCE.sendToAll(new PacketGeneralMessage("An admin enabled turn-based-combat for everyone"));
}
}