Do not track arrow if the bow has Infinity

This commit is contained in:
bm01 2012-06-15 02:53:11 +02:00
parent 032472dcb3
commit 55e832d4f6

View File

@ -1,6 +1,7 @@
package com.gmail.nossr50.util; package com.gmail.nossr50.util;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.AnimalTamer; import org.bukkit.entity.AnimalTamer;
import org.bukkit.entity.Animals; import org.bukkit.entity.Animals;
import org.bukkit.entity.Arrow; import org.bukkit.entity.Arrow;
@ -263,7 +264,9 @@ public class Combat {
archeryManager.dazeCheck((Player) target, event); archeryManager.dazeCheck((Player) target, event);
} }
archeryManager.trackArrows(target); if (!(shooter.getItemInHand().containsEnchantment(Enchantment.ARROW_INFINITE))) {
archeryManager.trackArrows(target);
}
if (target != shooter) { if (target != shooter) {
PlayerProfile PP = Users.getProfile(shooter); PlayerProfile PP = Users.getProfile(shooter);