-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
None
-
CraftBukkit version 2991-Spigot-018b9a0-f3f3094 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
-
Yes
It seems like getSource() will return null from the AreaEffectCloud created by lingering potion fired from dispenser. getSource() should return a ProjectileSource, which should lead to the dispenser block.
Test with this code:
List<Entity> nearby = player.getNearbyEntities(32, 32, 32); for (Entity entity : nearby) { if (entity instanceof AreaEffectCloud) { AreaEffectCloud area = (AreaEffectCloud) entity; player.sendMessage(entity.getType().name() + "'s source: " + area.getSource()); } }
A test plugin is attached. Use command "/taec" to show nearby AreaEffectCloud nearby. The screenshot represents two lingering potions being thrown: One by myself, and one by dispenser.
On the other hand: getShooter() from Arrows fired by dispenser works fine.