Do not track the channel "BungeeCord" when using "RedisBungee" and

viceversa.
This commit is contained in:
filoghost 2015-03-31 18:58:08 +02:00
parent fe4099223f
commit 2187a7670a

View File

@ -35,7 +35,23 @@ public class BungeeChannel implements PluginMessageListener {
@Override @Override
public void onPluginMessageReceived(String channel, Player player, byte[] message) { public void onPluginMessageReceived(String channel, Player player, byte[] message) {
if (!channel.equals("BungeeCord") && !channel.equals("RedisBungee")) {
if (channel.equals("BungeeCord")) {
if (Configuration.useRedisBungee) {
// If we use RedisBungee, we must ignore this channel.
return;
}
} else if (channel.equals("RedisBungee")) {
if (!Configuration.useRedisBungee) {
// Same as above, just the opposite case.
return;
}
} else {
// Not our channels, ignore the message.
return; return;
} }