added permission
This commit is contained in:
parent
66870ee42e
commit
eed4a67069
@ -149,6 +149,8 @@ public class Main extends JavaPlugin implements Listener, CommandExecutor
|
|||||||
|
|
||||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
|
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
|
||||||
if(cmd.getName().equalsIgnoreCase("tealimit")){
|
if(cmd.getName().equalsIgnoreCase("tealimit")){
|
||||||
|
|
||||||
|
if(sender.hasPermission("tealimit.admin")){
|
||||||
if(args.length == 0){
|
if(args.length == 0){
|
||||||
sender.sendMessage("Invalid argument!");
|
sender.sendMessage("Invalid argument!");
|
||||||
return false;
|
return false;
|
||||||
@ -160,6 +162,11 @@ public class Main extends JavaPlugin implements Listener, CommandExecutor
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
sender.sendMessage("Insufficient Permission!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,4 +7,6 @@ description: Limit entity spawns
|
|||||||
|
|
||||||
commands:
|
commands:
|
||||||
tealimit:
|
tealimit:
|
||||||
|
permission: tealimit.admin
|
||||||
description: Basic Command
|
description: Basic Command
|
||||||
|
usage: /<command> - usage
|
||||||
|
Loading…
Reference in New Issue
Block a user