Improved speaker support for text formatting
This commit is contained in:
parent
38131f9b37
commit
e9fe182f56
2 changed files with 5 additions and 1 deletions
|
@ -248,6 +248,10 @@ public class Commons {
|
|||
|
||||
public static void addChatMessage(final ICommandSender commandSender, @Nonnull final ITextComponent textComponent) {
|
||||
final String message = textComponent.getFormattedText();
|
||||
addChatMessage(commandSender, message);
|
||||
}
|
||||
|
||||
public static void addChatMessage(final ICommandSender commandSender, @Nonnull final String message) {
|
||||
if (commandSender == null) {
|
||||
WarpDrive.logger.error(String.format("Unable to send message to NULL sender: %s",
|
||||
message));
|
||||
|
|
|
@ -67,7 +67,7 @@ public class TileEntitySpeaker extends TileEntityAbstractMachine {
|
|||
&& entityPlayerMP.isEntityAlive()
|
||||
&& !entityPlayerMP.isSpectator() );
|
||||
for (final EntityPlayerMP entityPlayerMP : playersInRange) {
|
||||
entityPlayerMP.sendMessage(messageFormatted);
|
||||
Commons.addChatMessage(entityPlayerMP, messageFormatted);
|
||||
}
|
||||
rateMessaging++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue