Unnecessary line change

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2022-12-07 18:37:59 +01:00
parent 220217fcc1
commit 915836f490

View File

@ -32,13 +32,14 @@ public class ChatMessageListener {
} }
public static void chatMessageListener(ClientChatMessagePacket packet, Player player) { public static void chatMessageListener(ClientChatMessagePacket packet, Player player) {
final String message = packet.message();
if (!Messenger.canReceiveMessage(player)) { if (!Messenger.canReceiveMessage(player)) {
Messenger.sendRejectionMessage(player); Messenger.sendRejectionMessage(player);
return; return;
} }
final Collection<Player> players = CONNECTION_MANAGER.getOnlinePlayers(); final Collection<Player> players = CONNECTION_MANAGER.getOnlinePlayers();
PlayerChatEvent playerChatEvent = new PlayerChatEvent(player, players, () -> buildDefaultChatMessage(player, packet.message()), packet.message()); PlayerChatEvent playerChatEvent = new PlayerChatEvent(player, players, () -> buildDefaultChatMessage(player, message), message);
// Call the event // Call the event
EventDispatcher.callCancellable(playerChatEvent, () -> { EventDispatcher.callCancellable(playerChatEvent, () -> {