Merge branch 'anvil_unbreakables' of github.com:GiovanH/mcMMO

This commit is contained in:
Glitchfinder 2018-05-11 10:07:53 -07:00
commit c87b410823
3 changed files with 13 additions and 0 deletions

View File

@ -62,6 +62,11 @@ public class RepairManager extends SkillManager {
Player player = getPlayer();
Repairable repairable = mcMMO.getRepairableManager().getRepairable(item.getType());
if (item.getItemMeta().isUnbreakable()) {
player.sendMessage(LocaleLoader.getString("Anvil.Unbreakable"));
return;
}
// Permissions checks on material and item types
if (!Permissions.repairMaterialType(player, repairable.getRepairMaterialType())) {
player.sendMessage(LocaleLoader.getString("mcMMO.NoPermission"));

View File

@ -60,6 +60,11 @@ public class SalvageManager extends SkillManager {
Salvageable salvageable = mcMMO.getSalvageableManager().getSalvageable(item.getType());
if (item.getItemMeta().isUnbreakable()) {
player.sendMessage(LocaleLoader.getString("Anvil.Unbreakable"));
return;
}
// Permissions checks on material and item types
if (!Permissions.salvageItemType(player, salvageable.getSalvageItemType())) {
player.sendMessage(LocaleLoader.getString("mcMMO.NoPermission"));

View File

@ -283,6 +283,9 @@ Salvage.Listener.Anvil=[[DARK_RED]]You have placed a Salvage anvil, use this to
Salvage.Listener=Salvage:
Salvage.SkillName=SALVAGE
#Anvil (Shared between SALVAGE and REPAIR)
Anvil.Unbreakable=This item is unbreakable!
#SWORDS
Swords.Ability.Lower=[[GRAY]]**YOU LOWER YOUR SWORD**
Swords.Ability.Ready=[[GREEN]]**YOU READY YOUR SWORD**