mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-12-26 20:27:38 +01:00
Added player_head as a target
This commit is contained in:
parent
cea2f97259
commit
c407b51071
@ -6,6 +6,7 @@ import com.willfp.eco.core.PluginDependent;
|
||||
import com.willfp.eco.util.NumberUtils;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentTarget;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Material;
|
||||
@ -41,7 +42,8 @@ public class EnchantingListeners extends PluginDependent implements Listener {
|
||||
.add(Material.SHIELD)
|
||||
.add(Material.FLINT_AND_STEEL)
|
||||
.add(Material.SHEARS)
|
||||
.add(Material.CARROT_ON_A_STICK).build();
|
||||
.add(Material.CARROT_ON_A_STICK)
|
||||
.add(Material.PLAYER_HEAD).build();
|
||||
|
||||
/**
|
||||
* Instantiate enchanting listeners and link them to a specific plugin.
|
||||
@ -236,6 +238,10 @@ public class EnchantingListeners extends PluginDependent implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!EnchantmentTarget.ALL.getMaterials().contains(event.getItem().getType())) {
|
||||
return;
|
||||
}
|
||||
|
||||
int bonus = event.getEnchantmentBonus();
|
||||
if (bonus > 15) {
|
||||
bonus = 15;
|
||||
|
Loading…
Reference in New Issue
Block a user