diff --git a/bungeecord/src/main/java/it/frafol/cleanstaffchat/bungee/staffchat/commands/StaffListCommand.java b/bungeecord/src/main/java/it/frafol/cleanstaffchat/bungee/staffchat/commands/StaffListCommand.java index 5acf97300..3c4c7c169 100644 --- a/bungeecord/src/main/java/it/frafol/cleanstaffchat/bungee/staffchat/commands/StaffListCommand.java +++ b/bungeecord/src/main/java/it/frafol/cleanstaffchat/bungee/staffchat/commands/StaffListCommand.java @@ -90,7 +90,9 @@ public void execute(CommandSender sender, String[] args) { if (BungeeConfig.SORTING_LIST_ENABLE.get(Boolean.class)) { List sortedList = new ArrayList<>(); for (String groups : BungeeConfig.SORTING_LIST.getStringList()) { - for (User user : api.getUserManager().getLoadedUsers()) { + for (UUID uuid : list) { + User user = api.getUserManager().getUser(uuid); + if (user == null) continue; Group group = api.getGroupManager().getGroup(groups); if (user.getInheritedGroups(QueryOptions.builder(QueryMode.CONTEXTUAL).build()).contains(group)) { sortedList.add(user.getUniqueId()); diff --git a/bungeecord/src/main/resources/config.yml b/bungeecord/src/main/resources/config.yml index 0d05118eb..475d9e8c7 100644 --- a/bungeecord/src/main/resources/config.yml +++ b/bungeecord/src/main/resources/config.yml @@ -82,7 +82,7 @@ settings: stafflist_bypass_permission: "stafflist.bypass" # You can enable or disable the bypass permission. - bypass_enabled: true + bypass_enabled: false # Select if you want to sort the staff list by group weight. # Set a weight in LP using: /lp group setweight . @@ -152,14 +152,7 @@ modules: # You have to activate this option to fix it, please follow these steps: # 1. Add this plugin in Spigot and BungeeCord servers. # 2. Activate this option in both servers (this option will disable all staffchat modules in Spigot also). - # 3. Your problem is now fixed, note that Velocity is not affected by this issue if you install SignedVelocity in both Velocity and Spigot server. + # 3. Your problem is now fixed. kick_workaround: false - # Are you getting double messages on Velocity when talking in staffchat/adminchat/donorchat? - # You have to activate this option to fix it, please follow these steps: - # 1. Add this plugin in Spigot and Velocity servers. - # 2. Activate this option in both servers (this option will disable all staffchat modules in Spigot also). - # 3. Your problem is now fixed, note that BungeeCord is not affected by this issue. - double_message_workaround: false - # Enjoy. \ No newline at end of file diff --git a/spigot/src/main/java/it/frafol/cleanstaffchat/bukkit/staffchat/commands/impl/StaffListCommand.java b/spigot/src/main/java/it/frafol/cleanstaffchat/bukkit/staffchat/commands/impl/StaffListCommand.java index 9fa9d77cb..7b5f81e32 100644 --- a/spigot/src/main/java/it/frafol/cleanstaffchat/bukkit/staffchat/commands/impl/StaffListCommand.java +++ b/spigot/src/main/java/it/frafol/cleanstaffchat/bukkit/staffchat/commands/impl/StaffListCommand.java @@ -82,7 +82,9 @@ public boolean execute(@NotNull CommandSender sender, @NotNull String commandLab if (SpigotConfig.SORTING_LIST_ENABLE.get(Boolean.class)) { List sortedList = new ArrayList<>(); for (String groups : SpigotConfig.SORTING_LIST.getStringList()) { - for (User user : api.getUserManager().getLoadedUsers()) { + for (UUID uuid : list) { + User user = api.getUserManager().getUser(uuid); + if (user == null) continue; Group group = api.getGroupManager().getGroup(groups); if (user.getInheritedGroups(QueryOptions.builder(QueryMode.CONTEXTUAL).build()).contains(group)) { sortedList.add(user.getUniqueId()); diff --git a/spigot/src/main/resources/config.yml b/spigot/src/main/resources/config.yml index 0d05118eb..fd6e91320 100644 --- a/spigot/src/main/resources/config.yml +++ b/spigot/src/main/resources/config.yml @@ -38,7 +38,7 @@ settings: staff_quit_all_players: false # By activating it, the staff will receive a message every time any player leaves the server. staff_switch_all_players: false # By activating it, the staff will receive a message every time any player switch a server. - staff_disable_afk_on_move: true # On Velocity and BungeeCord, this works when a player changes server. + staff_disable_afk_on_move: true staff_join_silent: false # By activating it, the staff will not receive a message when another staff member with a permission enters the server. staff_quit_silent: false # By activating it, the staff will not receive a message when another staff member with a permission leaves the server. @@ -82,7 +82,7 @@ settings: stafflist_bypass_permission: "stafflist.bypass" # You can enable or disable the bypass permission. - bypass_enabled: true + bypass_enabled: false # Select if you want to sort the staff list by group weight. # Set a weight in LP using: /lp group setweight . diff --git a/velocity/src/main/java/it/frafol/cleanstaffchat/velocity/staffchat/commands/StaffListCommand.java b/velocity/src/main/java/it/frafol/cleanstaffchat/velocity/staffchat/commands/StaffListCommand.java index fe7479bdf..f6837a356 100644 --- a/velocity/src/main/java/it/frafol/cleanstaffchat/velocity/staffchat/commands/StaffListCommand.java +++ b/velocity/src/main/java/it/frafol/cleanstaffchat/velocity/staffchat/commands/StaffListCommand.java @@ -61,19 +61,9 @@ public void execute(@NotNull Invocation invocation) { list = handleRedis(); } else { for (Player players : PLUGIN.getServer().getAllPlayers()) { - - if (!players.hasPermission(VelocityConfig.STAFFLIST_SHOW_PERMISSION.get(String.class))) { - continue; - } - - if (VelocityConfig.STAFFLIST_BYPASS.get(Boolean.class) && players.hasPermission(VelocityConfig.STAFFLIST_BYPASS_PERMISSION.get(String.class))) { - continue; - } - - if (PLUGIN.isPremiumVanish() && VanishUtil.isVanished(players)) { - continue; - } - + if (!players.hasPermission(VelocityConfig.STAFFLIST_SHOW_PERMISSION.get(String.class))) continue; + if (VelocityConfig.STAFFLIST_BYPASS.get(Boolean.class) && players.hasPermission(VelocityConfig.STAFFLIST_BYPASS_PERMISSION.get(String.class))) continue; + if (PLUGIN.isPremiumVanish() && VanishUtil.isVanished(players)) continue; list.add(players.getUniqueId()); } } @@ -90,7 +80,9 @@ public void execute(@NotNull Invocation invocation) { if (VelocityConfig.SORTING_LIST_ENABLE.get(Boolean.class)) { List sortedList = new ArrayList<>(); for (String groups : VelocityConfig.SORTING_LIST.getStringList()) { - for (User user : api.getUserManager().getLoadedUsers()) { + for (UUID uuid : list) { + User user = api.getUserManager().getUser(uuid); + if (user == null) continue; Group group = api.getGroupManager().getGroup(groups); if (user.getInheritedGroups(QueryOptions.builder(QueryMode.CONTEXTUAL).build()).contains(group)) { if (!sortedList.contains(user.getUniqueId()) && list.contains(user.getUniqueId())) { diff --git a/velocity/src/main/resources/config.yml b/velocity/src/main/resources/config.yml index 0d05118eb..70fe3b073 100644 --- a/velocity/src/main/resources/config.yml +++ b/velocity/src/main/resources/config.yml @@ -82,7 +82,7 @@ settings: stafflist_bypass_permission: "stafflist.bypass" # You can enable or disable the bypass permission. - bypass_enabled: true + bypass_enabled: false # Select if you want to sort the staff list by group weight. # Set a weight in LP using: /lp group setweight . @@ -148,18 +148,11 @@ modules: stafflist_module: true - # Are you getting kicked on BungeeCord when switching staffchat mode to globalchat mode? - # You have to activate this option to fix it, please follow these steps: - # 1. Add this plugin in Spigot and BungeeCord servers. - # 2. Activate this option in both servers (this option will disable all staffchat modules in Spigot also). - # 3. Your problem is now fixed, note that Velocity is not affected by this issue if you install SignedVelocity in both Velocity and Spigot server. - kick_workaround: false - # Are you getting double messages on Velocity when talking in staffchat/adminchat/donorchat? # You have to activate this option to fix it, please follow these steps: # 1. Add this plugin in Spigot and Velocity servers. # 2. Activate this option in both servers (this option will disable all staffchat modules in Spigot also). - # 3. Your problem is now fixed, note that BungeeCord is not affected by this issue. + # 3. Your problem is now fixed. double_message_workaround: false # Enjoy. \ No newline at end of file