Skip to content

Commit

Permalink
fix(bungeecord): ignore message channel case
Browse files Browse the repository at this point in the history
  • Loading branch information
Silthus committed Mar 3, 2022
1 parent fd61370 commit 0313abd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 0313abd

Please sign in to comment.