Skip to content

Commit

Permalink
Fixed whitelist/restricted not working well in groups
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgeiss0702 committed Jun 6, 2023
1 parent a99bd73 commit 80289de
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Expand Up @@ -52,8 +52,6 @@ public void handle(AdaptedPlayer receivingPlayer, byte[] data) throws IOExceptio

if(response == null) return;

Debug.info("Responding with " + response);

main.getPlatformMethods().sendPluginMessage(
receivingPlayer,
s(response.getFrom()),
Expand Down
Expand Up @@ -37,6 +37,11 @@ public AdaptedServer getIdealServer(AdaptedPlayer player) {
selectednum = online;
continue;
}
if(!selected.isJoinable(player) && sv.isJoinable(player)) {
selected = sv;
selectednum = online;
continue;
}
if(selectednum > online && sv.isJoinable(player)) {
selected = sv;
selectednum = online;
Expand Down
2 changes: 2 additions & 0 deletions spigot/src/main/java/us/ajg0702/queue/spigot/SpigotMain.java
Expand Up @@ -122,6 +122,8 @@ public void onPluginMessageReceived(@NotNull String channel, @NotNull Player pla
ComResponse response = ComResponse.from(subchannel, in);

responseManager.executeResponse(response);
} catch (IllegalStateException ignored) {
// This seems to happen often when a player leaves. So, we'll ignore it.
} catch (Exception e) {
getLogger().log(Level.SEVERE, "Error while processing proxy response " + subchannel + ": ", e);
}
Expand Down

0 comments on commit 80289de

Please sign in to comment.