Skip to content

Commit

Permalink
confuse plugin snoopers
Browse files Browse the repository at this point in the history
  • Loading branch information
YouHaveTrouble committed Sep 1, 2021
1 parent 7c33718 commit 5bcf5bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public void onCommandTabComplete(AsyncTabCompleteEvent event) {
if (!(event.getSender() instanceof Player)) return;
Player player = (Player) event.getSender();
if (player.hasPermission(CWPermission.BYPASS.permission())) return;
if (event.getCompletions().isEmpty()) return;
String buffer = event.getBuffer();
if (!buffer.endsWith(" ") && buffer.split(" ").length == 1) event.setCancelled(true);
if (event.getCompletions().isEmpty()) return;
event.setCompletions(CommandUtil.filterSuggestions(buffer, event.getCompletions(), CommandWhitelistBukkit.getSuggestions(player)));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public void onCommandTabComplete(TabCompleteEvent event) {
if (!(event.getSender() instanceof Player)) return;
Player player = (Player) event.getSender();
if (player.hasPermission(CWPermission.BYPASS.permission())) return;
if (event.getCompletions().isEmpty()) return;
String buffer = event.getBuffer();
if (!buffer.endsWith(" ") && buffer.split(" ").length == 1) event.setCancelled(true);
if (event.getCompletions().isEmpty()) return;
event.setCompletions(
CommandUtil.filterSuggestions(
buffer,
Expand Down

0 comments on commit 5bcf5bb

Please sign in to comment.