fabric: Fix EOFException reading plugin messages, close #367

This commit is contained in:
William committed 2023-04-26 20:25:18 +01:00
1 parent 6627bf4ec5
commit 2a8f009c69
2 files changed
+8 -3

No files matched your search

@@ -434,7 +434,7 @@ public class SpongeHuskHomes implements HuskHomes, SpongeTaskRunner, SpongeSafet
// Read the message and handle
final SpongeUser user = (SpongeUser) playerConnection.get();
final String channel = pluginMessage.readUTF();
if (broker instanceof PluginMessageBroker messenger) {
if (broker instanceof PluginMessageBroker messenger && getSettings().getBrokerType() == Broker.Type.PLUGIN_MESSAGE) {
messenger.onReceive(channel, user, pluginMessage.readBytes(pluginMessage.available()));
}
}