mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Added permission node to bypass Arcane Repair and keep enchantments
This commit is contained in:
parent
0441b062bd
commit
74b7aa5340
@ -12,6 +12,7 @@ Version 2.0.00-dev
|
||||
+ Added ability to summon Ocelots with Call of the Wild
|
||||
+ Added offline user functionality to mmoedit
|
||||
+ Added bookshelves to list of blocks that don't trigger abilities.
|
||||
+ Added 'mcmmo.skills.repair.arcanebypass' permission node to bypass Arcane Repair and keep your enchantments
|
||||
= Fixed ClassCastException from Taming preventDamage checks
|
||||
= Fixed issue with Blast Mining not seeing TNT for detonation due to snow
|
||||
= Fixed issue with block interaction returning NPEs
|
||||
|
@ -124,6 +124,10 @@ public class mcPermissions {
|
||||
public boolean repair(Player player) {
|
||||
return player.hasPermission("mcmmo.skills.repair");
|
||||
}
|
||||
|
||||
public boolean repairArcaneBypass(Player player) {
|
||||
return player.hasPermission(("mcmmo.skills.repair.arcanebypass"));
|
||||
}
|
||||
|
||||
public boolean unarmed(Player player) {
|
||||
return player.hasPermission("mcmmo.skills.unarmed");
|
||||
|
@ -240,7 +240,6 @@ public class Repair {
|
||||
player.sendMessage(mcLocale.getString("Repair.Downgraded"));
|
||||
else
|
||||
player.sendMessage(mcLocale.getString("Repair.ArcanePerfect"));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -532,7 +531,7 @@ public class Repair {
|
||||
public static void repairItem(Player player, ItemStack is)
|
||||
{
|
||||
//Handle the enchantments
|
||||
if(LoadProperties.mayLoseEnchants)
|
||||
if(LoadProperties.mayLoseEnchants && !mcPermissions.getInstance().repairArcaneBypass(player))
|
||||
addEnchants(player, is);
|
||||
is.setDurability(getRepairAmount(is, player));
|
||||
}
|
||||
|
@ -210,6 +210,8 @@ permissions:
|
||||
description: Allows access to the Woodcutting skill
|
||||
mcmmo.skills.repair:
|
||||
description: Allows access to the Repair skill
|
||||
mcmmo.skills.repair.arcanebypass:
|
||||
description: Allows user to bypass Arcane Repair so he will never lose enchantments
|
||||
mcmmo.skills.unarmed:
|
||||
description: Allows access to the Unarmed skill
|
||||
mcmmo.skills.archery:
|
||||
|
Loading…
Reference in New Issue
Block a user