mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-07 19:30:48 +01:00
Fix ProjectileSource -> Entity CCE; resolves #735
This commit is contained in:
parent
70929fbda5
commit
42cd5a1bf2
@ -64,6 +64,7 @@ import org.bukkit.event.player.PlayerQuitEvent;
|
|||||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.bukkit.projectiles.ProjectileSource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Daniel Saukel, Frank Baumann, Milan Albrecht
|
* @author Daniel Saukel, Frank Baumann, Milan Albrecht
|
||||||
@ -159,7 +160,10 @@ public class DPlayerListener implements Listener {
|
|||||||
Entity attackedEntity = event.getEntity();
|
Entity attackedEntity = event.getEntity();
|
||||||
|
|
||||||
if (attackerEntity instanceof Projectile) {
|
if (attackerEntity instanceof Projectile) {
|
||||||
attackerEntity = (Entity) ((Projectile) attackerEntity).getShooter();
|
ProjectileSource source = ((Projectile) attackerEntity).getShooter();
|
||||||
|
if (source instanceof Entity) {
|
||||||
|
attackerEntity = (Entity) source;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Player attackerPlayer = null;
|
Player attackerPlayer = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user