diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-08-02 19:01:14 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-08-02 19:02:23 -0500 |
commit | 7789f67744792aca875229d00ddb38dc952bee52 (patch) | |
tree | 0472119ecebd5edcc1f51e9eee6c7313212a6078 /src/main/java/org | |
parent | bd5dd94afb52b23a38af3352f2d8728bb72d6e49 (diff) | |
download | bukkit-7789f67744792aca875229d00ddb38dc952bee52.tar bukkit-7789f67744792aca875229d00ddb38dc952bee52.tar.gz bukkit-7789f67744792aca875229d00ddb38dc952bee52.tar.lz bukkit-7789f67744792aca875229d00ddb38dc952bee52.tar.xz bukkit-7789f67744792aca875229d00ddb38dc952bee52.zip |
Test command permissions before running them.
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java | 1 | ||||
-rw-r--r-- | src/main/java/org/bukkit/command/defaults/SeedCommand.java | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java b/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java index d323bee6..c633f8ad 100644 --- a/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java +++ b/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java @@ -19,6 +19,7 @@ public class DefaultGameModeCommand extends VanillaCommand { @Override public boolean execute(CommandSender sender, String commandLabel, String[] args) { + if (!testPermission(sender)) return true; if (args.length == 0) { sender.sendMessage("Useage: " + usageMessage); return false; diff --git a/src/main/java/org/bukkit/command/defaults/SeedCommand.java b/src/main/java/org/bukkit/command/defaults/SeedCommand.java index 08258e5a..4fac2678 100644 --- a/src/main/java/org/bukkit/command/defaults/SeedCommand.java +++ b/src/main/java/org/bukkit/command/defaults/SeedCommand.java @@ -14,6 +14,7 @@ public class SeedCommand extends VanillaCommand { @Override public boolean execute(CommandSender sender, String commandLabel, String[] args) { + if (!testPermission(sender)) return true; long seed; if (sender instanceof Player) { seed = ((Player) sender).getWorld().getSeed(); |