Disable the ability to view cancelled player commands (#2)

* Disable the ability to view cancelled player commands

This would mean that you cannot see the commands of persons who have been ICU controlled.
This would be a nice quality-of-life update because some bots who have been ICU controlled can still clog up CommandSpy even though their commands mean nothing.

* Move check outside the loop, per mathiascode's request

* Remove superfluous check
This commit is contained in:
Business Goose 2020-12-12 16:59:04 +00:00 committed by GitHub
parent fb0c8e11ae
commit b2df42a51c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -66,6 +66,10 @@ public final class Main extends JavaPlugin implements CommandExecutor, Listener
@EventHandler
void onPlayerCommandPreprocess(final PlayerCommandPreprocessEvent event) {
if (event.isCancelled()) {
return;
}
for (String uuidString : config.getKeys(false)) {
UUID uuid = UUID.fromString(uuidString);