From 7ee4bae68acf107de284f56b10a645fe97b16dd2 Mon Sep 17 00:00:00 2001 From: William278 Date: Wed, 14 Feb 2024 09:00:34 +0000 Subject: [PATCH] fix: plugin message channels not registering with Redis broker --- .../main/java/net/william278/huskhomes/BukkitHuskHomes.java | 4 ++-- .../java/net/william278/huskhomes/network/RedisBroker.java | 3 +++ gradle.properties | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bukkit/src/main/java/net/william278/huskhomes/BukkitHuskHomes.java b/bukkit/src/main/java/net/william278/huskhomes/BukkitHuskHomes.java index e2ba7ed9..f8e699ff 100644 --- a/bukkit/src/main/java/net/william278/huskhomes/BukkitHuskHomes.java +++ b/bukkit/src/main/java/net/william278/huskhomes/BukkitHuskHomes.java @@ -353,8 +353,8 @@ public void registerMetrics(int metricsId) { @Override public void initializePluginChannels() { final String channelId = PluginMessageBroker.BUNGEE_CHANNEL_ID; - Bukkit.getMessenger().registerIncomingPluginChannel(this, channelId, this); - Bukkit.getMessenger().registerOutgoingPluginChannel(this, channelId); + getServer().getMessenger().registerIncomingPluginChannel(this, channelId, this); + getServer().getMessenger().registerOutgoingPluginChannel(this, channelId); } @Override diff --git a/common/src/main/java/net/william278/huskhomes/network/RedisBroker.java b/common/src/main/java/net/william278/huskhomes/network/RedisBroker.java index 4063a7d1..d1fe3611 100644 --- a/common/src/main/java/net/william278/huskhomes/network/RedisBroker.java +++ b/common/src/main/java/net/william278/huskhomes/network/RedisBroker.java @@ -49,6 +49,9 @@ public RedisBroker(@NotNull HuskHomes plugin) { @Blocking @Override public void initialize() throws IllegalStateException { + // Initialize plugin message channels + super.initialize(); + // Establish a connection with the Redis server final Pool jedisPool = getJedisPool(plugin.getSettings().getCrossServer().getRedis()); try { diff --git a/gradle.properties b/gradle.properties index fc556f3a..64517046 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ org.gradle.jvmargs='-Dfile.encoding=UTF-8' org.gradle.daemon=true # Plugin metadata -plugin_version=4.6 +plugin_version=4.6.1 plugin_archive=huskhomes plugin_description=The powerful and intuitive homes, warps, and teleports plugin/mod