From 5e63f2572df0a078837cb946a3ee9a4cebc6e596 Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Wed, 23 Feb 2022 23:19:40 -0600 Subject: [PATCH] Don't set the join message --- .../java/dev/plex/listener/impl/PlayerListener.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/dev/plex/listener/impl/PlayerListener.java b/src/main/java/dev/plex/listener/impl/PlayerListener.java index 935ecdc..b7c8be3 100644 --- a/src/main/java/dev/plex/listener/impl/PlayerListener.java +++ b/src/main/java/dev/plex/listener/impl/PlayerListener.java @@ -8,6 +8,7 @@ import dev.plex.listener.PlexListener; import dev.plex.player.PlexPlayer; import dev.plex.player.PunishedPlayer; import dev.plex.util.PlexLog; +import dev.plex.util.PlexUtils; import java.util.Collections; import java.util.UUID; import net.kyori.adventure.text.Component; @@ -30,7 +31,6 @@ public class PlayerListener extends PlexListener public void onPlayerSetup(PlayerJoinEvent event) { Player player = event.getPlayer(); - PlexPlayer plexPlayer; if (plugin.getSystem().equalsIgnoreCase("ranks")) @@ -76,11 +76,9 @@ public class PlayerListener extends PlexListener if (!loginMessage.isEmpty()) { - event.joinMessage( - Component.text(ChatColor.AQUA + player.getName() + " is ").color(NamedTextColor.AQUA).append(LegacyComponentSerializer.legacyAmpersand().deserialize(loginMessage)) - .append(Component.newline()) - .append(Component.text(player.getName() + " joined the game").color(NamedTextColor.YELLOW)) - ); + PlexUtils.broadcast( + Component.text(ChatColor.AQUA + player.getName() + " is ").color(NamedTextColor.AQUA) + .append(LegacyComponentSerializer.legacyAmpersand().deserialize(loginMessage))); } }