@EventHandler public void onPlayerQuit(PlayerQuitEvent event) { final YBEffect effect = effects.remove(event.getPlayer()); if (effect == null) return; effect.stop(); }
@EventHandler public void onEntityDeath(EntityDeathEvent event) { final YBEffect effect = effects.remove(event.getEntity()); if (effect == null) return; effect.stop(); }