Skip to content

Commit

Permalink
Fixed an issue with the full tab of bungeecord whitelisted commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
zS0bye committed Feb 1, 2023
1 parent 0278d5e commit 8f93df4
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,24 @@ public void onTabComplete(final TabCompleteEvent event) {

if(new TabComplete(player).bypass()) return;

commands.clear();

blockCmds.forEach(blockCmd -> {
if(!completion.startsWith("/" + blockCmd)) return;
commands.clear();
event.setCancelled(true);
});

if(!completion.startsWith("/") || completion.contains(" ")) return;
if(completions.isEmpty()) {
commands.clear();
event.setCancelled(true);
return;
}

completions.forEach(command -> {
if(completion.startsWith("/" + command)) return;
commands.clear();
});

if(Config.BLOCK_TAB_COMPLETE_WHITELISTED_SUGGESTIONS_PARTIAL_MATCHES.getBoolean()) {
commands.addAll(matches);
return;
Expand Down

0 comments on commit 8f93df4

Please sign in to comment.