Need thevoidmanager.score to execute /void score
This commit is contained in:
parent
f36e6b1aa0
commit
30be45065f
@ -14,10 +14,6 @@ import org.bukkit.command.TabCompleter;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.kyori.adventure.text.Component;
|
||||
import ovh.herisson.thevoidroad.DatabaseManager;
|
||||
import ovh.herisson.thevoidroad.TheVoidRoad;
|
||||
import ovh.herisson.thevoidroad.Voids;
|
||||
import ovh.herisson.thevoidroad.Merchand;
|
||||
|
||||
public class VoidCommands implements CommandExecutor, TabCompleter{
|
||||
private final Merchand m = Merchand.getInstance();
|
||||
@ -36,10 +32,13 @@ public class VoidCommands implements CommandExecutor, TabCompleter{
|
||||
}
|
||||
switch (args[0]) {
|
||||
case "score":
|
||||
if(!sender.hasPermission("void.score")){
|
||||
Voids.scoreboard().forEach((p, a) -> {
|
||||
sender.sendMessage(p + " : " + a);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
case "give":
|
||||
if(args.length < 2) return false;
|
||||
Player target = Bukkit.getPlayer(args[1]);
|
||||
@ -117,10 +116,13 @@ public class VoidCommands implements CommandExecutor, TabCompleter{
|
||||
ArrayList<String> list = new ArrayList<>();
|
||||
|
||||
if(args.length == 1){
|
||||
list.addAll(List.of("give","event", "score"));
|
||||
list.addAll(List.of("give","event"));
|
||||
if(sender.hasPermission("void.manage")){
|
||||
list.add("manage");
|
||||
}
|
||||
if(sender.hasPermission("void.score")){
|
||||
list.add("score");
|
||||
}
|
||||
}
|
||||
if(args.length >= 2){
|
||||
switch (args[0]) {
|
||||
|
@ -16,6 +16,9 @@ permissions:
|
||||
void.manage:
|
||||
description: "GameMaster's command"
|
||||
default: op
|
||||
void.score:
|
||||
description: "score the voids"
|
||||
default: op
|
||||
void.balance:
|
||||
description: "User of thevoidroad"
|
||||
default: not op
|
||||
|
Loading…
Reference in New Issue
Block a user