geforkt von Mirrors/Paper
Test command permissions before running them.
By: Travis Watkins <amaranth@ubuntu.com>
Dieser Commit ist enthalten in:
Ursprung
6d1174d97f
Commit
4535326014
@ -19,6 +19,7 @@ public class DefaultGameModeCommand extends VanillaCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
||||||
|
if (!testPermission(sender)) return true;
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
sender.sendMessage("Useage: " + usageMessage);
|
sender.sendMessage("Useage: " + usageMessage);
|
||||||
return false;
|
return false;
|
||||||
|
@ -14,6 +14,7 @@ public class SeedCommand extends VanillaCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
||||||
|
if (!testPermission(sender)) return true;
|
||||||
long seed;
|
long seed;
|
||||||
if (sender instanceof Player) {
|
if (sender instanceof Player) {
|
||||||
seed = ((Player) sender).getWorld().getSeed();
|
seed = ((Player) sender).getWorld().getSeed();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren