mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-12-23 19:57:36 +01:00
Fixed /ecoenchants randomenchant permission
This commit is contained in:
parent
4b2e3ba533
commit
86301252f8
@ -38,7 +38,7 @@ public class CommandRandomenchant extends Subcommand {
|
||||
return (sender, args) -> {
|
||||
Player player;
|
||||
|
||||
if ((args.isEmpty() && sender instanceof Player) || !sender.hasPermission("ecoenchants.randomenchant.others")) {
|
||||
if ((args.isEmpty() && sender instanceof Player) || !sender.hasPermission("ecoenchants.command.randomenchant.others")) {
|
||||
player = (Player) sender;
|
||||
} else {
|
||||
player = Bukkit.getServer().getPlayer(args.get(0));
|
||||
@ -88,7 +88,7 @@ public class CommandRandomenchant extends Subcommand {
|
||||
}
|
||||
}
|
||||
if (this.getPlugin().getConfigYml().getBool("anvil.hard-cap.enabled")
|
||||
&& !player.hasPermission("ecoenchants.randomenchant.bypasshardcap")
|
||||
&& !player.hasPermission("ecoenchants.command.randomenchant.bypasshardcap")
|
||||
&& onItem.size() >= this.getPlugin().getConfigYml().getInt("anvil.hard-cap.cap")) {
|
||||
conflicts = true;
|
||||
}
|
||||
@ -127,7 +127,7 @@ public class CommandRandomenchant extends Subcommand {
|
||||
|
||||
List<String> playerNames = Bukkit.getOnlinePlayers().stream().map(Player::getName).collect(Collectors.toList());
|
||||
|
||||
if (args.isEmpty() || !sender.hasPermission("ecoenchants.randomenchant.others")) {
|
||||
if (args.isEmpty() || !sender.hasPermission("ecoenchants.command.randomenchant.others")) {
|
||||
// Currently, this case is not ever reached
|
||||
return playerNames;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user