mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
parent
a9488bc18b
commit
f9dfec5bd0
@ -31,6 +31,7 @@ import org.bukkit.event.entity.ExplosionPrimeEvent;
|
|||||||
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
||||||
import org.bukkit.event.entity.PotionSplashEvent;
|
import org.bukkit.event.entity.PotionSplashEvent;
|
||||||
import org.bukkit.event.entity.ProjectileLaunchEvent;
|
import org.bukkit.event.entity.ProjectileLaunchEvent;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.PotionMeta;
|
import org.bukkit.inventory.meta.PotionMeta;
|
||||||
import org.bukkit.metadata.FixedMetadataValue;
|
import org.bukkit.metadata.FixedMetadataValue;
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
@ -76,7 +77,9 @@ public class EntityListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getBow().containsEnchantment(Enchantment.ARROW_INFINITE)) {
|
ItemStack bow = event.getBow();
|
||||||
|
|
||||||
|
if (bow != null && bow.containsEnchantment(Enchantment.ARROW_INFINITE)) {
|
||||||
projectile.setMetadata(mcMMO.infiniteArrowKey, mcMMO.metadataValue);
|
projectile.setMetadata(mcMMO.infiniteArrowKey, mcMMO.metadataValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user