mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 22:17:17 +00:00
Fix various issues
This commit is contained in:
35 files changed
+236
-243
No files matched your search
@@ -62,7 +62,7 @@ public abstract class Broker {
|
||||
*
|
||||
* @throws RuntimeException if the broker fails to initialize
|
||||
*/
|
||||
public abstract void initialize() throws RuntimeException;
|
||||
public abstract void initialize() throws IllegalStateException;
|
||||
|
||||
/**
|
||||
* Send a message to the broker
|
||||
|
||||
@@ -32,7 +32,7 @@ public class PluginMessageBroker extends Broker {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize() throws RuntimeException {
|
||||
public void initialize() throws IllegalStateException {
|
||||
plugin.initializePluginChannels();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ public class RedisBroker extends PluginMessageBroker {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize() throws RuntimeException {
|
||||
public void initialize() throws IllegalStateException {
|
||||
super.initialize();
|
||||
|
||||
final String password = plugin.getSettings().getRedisPassword();
|
||||
@@ -51,7 +51,7 @@ public class RedisBroker extends PluginMessageBroker {
|
||||
final Message message = plugin.getGson().fromJson(encodedMessage, Message.class);
|
||||
plugin.getOnlineUsers().stream()
|
||||
.filter(online -> message.getTarget().equals(Message.TARGET_ALL)
|
||||
|| online.getUsername().equals(message.getTarget()))
|
||||
|| online.getUsername().equals(message.getTarget()))
|
||||
.forEach(receiver -> handle(receiver, message));
|
||||
}
|
||||
}, getSubChannelId());
|
||||
|
||||
Reference in new issue
Block a user