2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-12-23 02:28:01 +00:00

fix bungeecord incorrect channel names

This commit is contained in:
mohammed jasem alaajel 2022-07-15 01:35:54 +04:00
parent c3d23a3601
commit d8a220bcc2
2 changed files with 6 additions and 1 deletions

View File

@ -463,6 +463,7 @@ public class RedisBungeeBungeePlugin extends Plugin implements RedisBungeePlugin
}, 0, 1, TimeUnit.MINUTES);
}
getProxy().registerChannel("legacy:redisbungee");
getProxy().registerChannel("redisbungee:redisbungee");
getProxy().registerChannel("RedisBungee");
// register commands
if (configuration.doOverrideBungeeCommands()) {

View File

@ -146,7 +146,11 @@ public class RedisBungeeListener extends AbstractRedisBungeeListener<LoginEvent,
@SuppressWarnings("UnstableApiUsage")
@EventHandler
public void onPluginMessage(PluginMessageEvent event) {
if ((event.getTag().equals("legacy:redisbungee") || event.getTag().equals("RedisBungee")) && event.getSender() instanceof Server) {
// this somehow has channel called RedisBungee not sure how it got here, keep it as it might break functionality
if (
(event.getTag().equals("legacy:redisbungee") || event.getTag().equals("redisbungee:redisbungee")
|| event.getTag().equals("RedisBungee")) && event.getSender() instanceof Server
) {
final String currentChannel = event.getTag();
final byte[] data = Arrays.copyOf(event.getData(), event.getData().length);
plugin.executeAsync(() -> {