mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Merge branch 'anvil_unbreakables' of github.com:GiovanH/mcMMO
This commit is contained in:
commit
c87b410823
@ -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"));
|
||||||
|
@ -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"));
|
||||||
|
@ -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**
|
||||||
|
Loading…
Reference in New Issue
Block a user