/** Handles player death events, removes the death message. */ @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) public void onPlayerDeath(PlayerDeathEvent event) { String playerName = event.getEntity().getName(); if (ultimateGames.getPlayerManager().isPlayerInArena(playerName)) { Arena arena = ultimateGames.getPlayerManager().getPlayerArena(playerName); arena.getGame().getGamePlugin().onPlayerDeath(arena, event); event.setDeathMessage(""); } }
@EventHandler(priority = EventPriority.LOWEST) public void onPlayerDeathEvent(final PlayerDeathEvent event) { final User user = ess.getUser(event.getEntity()); if (user.isAuthorized("essentials.back.ondeath") && !ess.getSettings().isCommandDisabled("back")) { user.setLastLocation(); user.sendMessage(_("backAfterDeath")); } if (!ess.getSettings().areDeathMessagesEnabled()) { event.setDeathMessage(""); } }