Codebase!

This commit is contained in:
GiovanH 2018-05-10 04:54:35 +01:00
parent 29c55312a5
commit 421455224f
3 changed files with 13 additions and 0 deletions

View File

@ -62,6 +62,11 @@ public class RepairManager extends SkillManager {
Player player = getPlayer(); Player player = getPlayer();
Repairable repairable = mcMMO.getRepairableManager().getRepairable(item.getType()); 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 // Permissions checks on material and item types
if (!Permissions.repairMaterialType(player, repairable.getRepairMaterialType())) { if (!Permissions.repairMaterialType(player, repairable.getRepairMaterialType())) {
player.sendMessage(LocaleLoader.getString("mcMMO.NoPermission")); player.sendMessage(LocaleLoader.getString("mcMMO.NoPermission"));

View File

@ -60,6 +60,11 @@ public class SalvageManager extends SkillManager {
Salvageable salvageable = mcMMO.getSalvageableManager().getSalvageable(item.getType()); 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 // Permissions checks on material and item types
if (!Permissions.salvageItemType(player, salvageable.getSalvageItemType())) { if (!Permissions.salvageItemType(player, salvageable.getSalvageItemType())) {
player.sendMessage(LocaleLoader.getString("mcMMO.NoPermission")); 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.Listener=Salvage:
Salvage.SkillName=SALVAGE Salvage.SkillName=SALVAGE
#Anvil (Shared between SALVAGE and REPAIR)
Anvil.Unbreakable=This item is unbreakable!
#SWORDS #SWORDS
Swords.Ability.Lower=[[GRAY]]**YOU LOWER YOUR SWORD** Swords.Ability.Lower=[[GRAY]]**YOU LOWER YOUR SWORD**
Swords.Ability.Ready=[[GREEN]]**YOU READY YOUR SWORD** Swords.Ability.Ready=[[GREEN]]**YOU READY YOUR SWORD**