diff --git a/bungeecord/src/main/java/net/silthus/schat/bungeecord/adapter/BungeecordMessengerGateway.java b/bungeecord/src/main/java/net/silthus/schat/bungeecord/adapter/BungeecordMessengerGateway.java index 89ffc65d5..483caecd0 100644 --- a/bungeecord/src/main/java/net/silthus/schat/bungeecord/adapter/BungeecordMessengerGateway.java +++ b/bungeecord/src/main/java/net/silthus/schat/bungeecord/adapter/BungeecordMessengerGateway.java @@ -28,7 +28,7 @@ import lombok.extern.java.Log; import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.config.ServerInfo; -import net.md_5.bungee.api.connection.ProxiedPlayer; +import net.md_5.bungee.api.connection.Server; import net.md_5.bungee.api.event.PluginMessageEvent; import net.md_5.bungee.api.plugin.Listener; import net.md_5.bungee.event.EventHandler; @@ -80,11 +80,11 @@ protected void sendToServer(ServerInfo server, byte[] bytes) { @EventHandler public void onIncomingMessage(PluginMessageEvent event) { - if (!event.getTag().equals(CHANNEL)) + if (!event.getTag().equalsIgnoreCase(CHANNEL)) return; event.setCancelled(true); - if (event.getSender() instanceof ProxiedPlayer) // message from proxy -> server + if (event.getReceiver() instanceof Server) // message from proxy -> server return; sendToAllServers(event.getData());