geforkt von Mirrors/Paper
SPIGOT-4735: ProjectileHitEvent Fires Immediately
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
5faa894081
Commit
455eafa839
@ -1052,7 +1052,11 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
public static ProjectileHitEvent callProjectileHitEvent(Entity entity, MovingObjectPosition position) {
|
||||
public static void callProjectileHitEvent(Entity entity, MovingObjectPosition position) {
|
||||
if (position.getType() == MovingObjectPosition.EnumMovingObjectType.MISS) {
|
||||
return;
|
||||
}
|
||||
|
||||
Block hitBlock = null;
|
||||
BlockFace hitFace = null;
|
||||
if (position.getType() == MovingObjectPosition.EnumMovingObjectType.BLOCK) {
|
||||
@ -1068,7 +1072,6 @@ public class CraftEventFactory {
|
||||
|
||||
ProjectileHitEvent event = new ProjectileHitEvent((Projectile) entity.getBukkitEntity(), hitEntity, hitBlock, hitFace);
|
||||
entity.world.getServer().getPluginManager().callEvent(event);
|
||||
return event;
|
||||
}
|
||||
|
||||
public static ExpBottleEvent callExpBottleEvent(Entity entity, int exp) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren