[SPIGOT-2465] EntityDamageEvent not executing for anything other than players? Created: 28/Jun/16 Updated: 29/Jul/16 Resolved: 28/Jun/16 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Major |
Reporter: | Tom Hoogstra | Assignee: | Unassigned |
Resolution: | Cannot Reproduce | Votes: | 0 |
Labels: | 1.10.2 |
Issue Links: |
|
Description |
Either my shit is completely toasted, or something has went wrong with recent versions. My event is properly registered, other events in the same class execute fine, but if I use the following code @EventHandler public void onDeath(EntityDeathEvent e){ Bukkit.broadcastMessage("test"); } "test" will only be broadcasted when a player dies. I have killed countless sheep, switched classes that the listener is in, everything. |
Comments |
Comment by Tom Hoogstra [ 29/Jun/16 ] |
I think I found something that might be causing my problem. |
Comment by Tom Hoogstra [ 29/Jun/16 ] |
Are there any possible settings that could be causing this to happen? I made a class from scratch which still provides 0 output public class Test extends JavaPlugin implements Listener{ @EventHandler public void death(EntityDeathEvent event) { getServer().broadcastMessage( ReflectionToStringBuilder.toString( event ) ); } @Override public void onEnable() { Bukkit.getPluginManager().registerEvents(this, this); } |
Comment by md_5 [ 28/Jun/16 ] |
[09:32:42 INFO]: org.bukkit.event.entity.EntityDeathEvent@51ad3bf5[drops=[ItemStack {RAW_BEEF x 1}],dropExp=3,entity=CraftCow,name=<null>,async=false] @EventHandler
public void death(EntityDeathEvent event)
{
getServer().broadcastMessage( ReflectionToStringBuilder.toString( event ) );
}
|
Comment by Tom Hoogstra [ 28/Jun/16 ] |
Sorry, I meant EntityDeathEvent, not EntityDamageEvent. |