Package com.pixelmonmod.pixelmon.comm
Class ChatHandler
java.lang.Object
com.pixelmonmod.pixelmon.comm.ChatHandler
Methods to send messages to chat or battles.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.network.chat.MutableComponentgetMessage(String string, Object... data) Gets a translated message for later use.static voidsendBattleMessage(List<BattleParticipant> participants, String string, Object... data) Sends a battle message to participants in a battle.static voidsendBattleMessage(List<BattleParticipant> participants, net.minecraft.network.chat.Component message) Sends a battle message to all participants in a battle.static voidsendBattleMessage(net.minecraft.world.entity.Entity user, String string, Object... data) Sends a battle message to a player.static voidsendBattleMessage(net.minecraft.world.entity.Entity user, net.minecraft.network.chat.Component chat) Sends a battle message to a player.static voidsendChat(net.minecraft.commands.CommandSource owner, net.minecraft.commands.CommandSource owner2, String string, Object... data) Sends a message to two players.static voidsendChat(net.minecraft.commands.CommandSource receiver, net.minecraft.network.chat.Component message) Sends a message to a player.static voidSends a message to a player.static voidsendFormattedChat(net.minecraft.commands.CommandSource receiver, net.minecraft.ChatFormatting chatFormat, String string, Object... data) Sends a formatted message to a player.static voidsendMessageToAllPlayers(net.minecraft.server.MinecraftServer minecraftServer, String string, Object... data) Sends a message to all players on the server. 
- 
Constructor Details
- 
ChatHandler
public ChatHandler() 
 - 
 - 
Method Details
- 
sendChat
public static void sendChat(net.minecraft.world.entity.Entity entityLiving, String string, Object... data) Sends a message to a player.- Parameters:
 entityLiving- The player to send the message to.string- The message to send.data- Additional arguments for the message.
 - 
sendChat
public static void sendChat(net.minecraft.commands.CommandSource receiver, net.minecraft.network.chat.Component message) Sends a message to a player.- Parameters:
 receiver- The player to send the message to.message- The message to send.
 - 
sendChat
public static void sendChat(net.minecraft.commands.CommandSource owner, net.minecraft.commands.CommandSource owner2, String string, Object... data) Sends a message to two players.- Parameters:
 owner- A player to send the message to.owner2- A player to send the message to.string- The message to send.data- Additional arguments for the message.
 - 
sendFormattedChat
public static void sendFormattedChat(net.minecraft.commands.CommandSource receiver, net.minecraft.ChatFormatting chatFormat, String string, Object... data) Sends a formatted message to a player.- Parameters:
 receiver- The player to send the message to.chatFormat- The format to apply to the message.string- The message to send.data- Additional arguments for the message.
 - 
sendBattleMessage
public static void sendBattleMessage(net.minecraft.world.entity.Entity user, String string, Object... data) Sends a battle message to a player.- Parameters:
 user- The player to send the message to.string- The message to send.data- Additional arguments for the message.
 - 
sendBattleMessage
public static void sendBattleMessage(net.minecraft.world.entity.Entity user, net.minecraft.network.chat.Component chat) Sends a battle message to a player.- Parameters:
 user- The player to send the message to.chat- The message to send.
 - 
sendBattleMessage
public static void sendBattleMessage(List<BattleParticipant> participants, String string, Object... data) Sends a battle message to participants in a battle.- Parameters:
 participants- The participants of the battle to send a message to.string- The message to send.data- Additional arguments for the message.
 - 
sendBattleMessage
public static void sendBattleMessage(List<BattleParticipant> participants, net.minecraft.network.chat.Component message) Sends a battle message to all participants in a battle.- Parameters:
 participants- The participants of the battle.message- The message to send.
 - 
getMessage
Gets a translated message for later use.- Parameters:
 string- The base message.data- Additional arguments for the message.- Returns:
 - The translated message.
 
 - 
sendMessageToAllPlayers
public static void sendMessageToAllPlayers(net.minecraft.server.MinecraftServer minecraftServer, String string, Object... data) Sends a message to all players on the server.- Parameters:
 minecraftServer-string- The message to send.
 
 -