mirror of
https://github.com/plexusorg/Plex.git
synced 2025-06-28 22:46:40 +00:00
Cache whether the server is on a proxy or not
Fix kick where ban message was displayed instead of kick message
This commit is contained in:
@ -10,6 +10,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class BungeeUtil
|
||||
{
|
||||
public static final boolean PROXIED_SERVER = isBungeeCord() || isVelocity();
|
||||
public static boolean isBungeeCord()
|
||||
{
|
||||
return Bukkit.spigot().getSpigotConfig().getBoolean("settings.bungeecord");
|
||||
@ -23,7 +24,7 @@ public class BungeeUtil
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
public static void kickPlayer(Player player, Component message)
|
||||
{
|
||||
if (isBungeeCord() || isVelocity())
|
||||
if (PROXIED_SERVER)
|
||||
{
|
||||
ByteArrayDataOutput out = ByteStreams.newDataOutput();
|
||||
out.writeUTF("KickPlayer");
|
||||
|
Reference in New Issue
Block a user