Added bypass for repair command
This commit is contained in:
parent
cb78772f85
commit
be11d3852a
1 changed files with 17 additions and 15 deletions
|
@ -448,6 +448,7 @@ public class V10LiftCommand implements CommandExecutor {
|
|||
|
||||
if (sender instanceof Player) {
|
||||
Player p = (Player) sender;
|
||||
if (!p.hasPermission("v10lift.admin")) {
|
||||
int masterAmount = V10LiftPlugin.getSConfig().getFile().getInt("MasterRepairAmount");
|
||||
Optional<XMaterial> mat = XMaterial.matchXMaterial(Objects.requireNonNull(V10LiftPlugin.getSConfig().getFile().getString("MasterRepairItem"), "MasterRepairItem is null"));
|
||||
if (!mat.isPresent()) {
|
||||
|
@ -467,6 +468,7 @@ public class V10LiftCommand implements CommandExecutor {
|
|||
p.getInventory().remove(new ItemStack(masterItem, masterAmount));
|
||||
}
|
||||
}
|
||||
}
|
||||
V10LiftPlugin.getAPI().setDefective(liftName, false);
|
||||
sender.sendMessage(ChatColor.GREEN + "Lift repaired!");
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue