remove items from inside soccer

This commit is contained in:
Mini-Chiss 2015-08-13 13:24:55 +02:00
parent 878ac82ade
commit 534c91c706

View File

@ -13,6 +13,8 @@ import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.entity.Slime;
import org.bukkit.entity.TNTPrimed;
import org.bukkit.entity.WitherSkull;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
@ -353,15 +355,15 @@ public class SoccerManager extends MiniPlugin
if (_ball != null && _ball.equals(ent))
continue;
if (ent instanceof Bat)
{
ent.remove();
continue;
}
if (inPlayerArena(ent))
{
if (ent instanceof Bat || ent instanceof WitherSkull || ent instanceof TNTPrimed)
{
ent.remove();
continue;
}
Location bounce = UtilAlg.getMidpoint(_cornerFieldPlayerA, _cornerFieldPlayerB);
bounce.setY(Math.min(_cornerFieldPlayerA.getY(), _cornerFieldPlayerB.getY()));
@ -370,7 +372,6 @@ public class SoccerManager extends MiniPlugin
bottom = bottom.getVehicle();
UtilAction.velocity(bottom, UtilAlg.getTrajectory(bounce, ent.getLocation()), 1, false, 0, 0.4, 1, true);
}
}
}