Skip to content

Commit

Permalink
Use the first arg instead of the whole comand
Browse files Browse the repository at this point in the history
  • Loading branch information
amit177 committed Apr 6, 2020
1 parent 07a2843 commit c839a1b
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 @@ -48,7 +48,7 @@ private boolean loadConfig() {

@EventHandler(priority = EventPriority.HIGHEST)
public void onConsoleCommand(ServerCommandEvent e) {
if (blockedCmds.contains(e.getCommand())) {
if (blockedCmds.contains(e.getCommand().split(" ")[0])) {
e.setCancelled(true);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: NoConsoleCmds
author: amit177
version: 1.0
version: 1.1
description: A plugin that blocks console from executing commands
main: systems.amit.spigot.noconsolecmds.NoConsoleCmds
commands:

0 comments on commit c839a1b

Please sign in to comment.