mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-05 07:04:44 +02:00
Enum more things, fixed some durability issues with abilities.
This commit is contained in:
@ -20,7 +20,9 @@ import java.util.logging.Logger;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.getspout.spoutapi.SpoutManager;
|
||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
||||
|
||||
@ -269,6 +271,19 @@ public class Skills
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void abilityDurabilityLoss(ItemStack inhand)
|
||||
{
|
||||
if(LoadProperties.toolsLoseDurabilityFromAbilities)
|
||||
{
|
||||
if(!inhand.containsEnchantment(Enchantment.DURABILITY))
|
||||
{
|
||||
short durability = inhand.getDurability();
|
||||
durability += (LoadProperties.abilityDurabilityLoss);
|
||||
inhand.setDurability(durability);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to see if an ability can be activated.
|
||||
*
|
||||
|
Reference in New Issue
Block a user