public void addPlayerOnKillListener() { if (_onKillListener != null) { throw new IllegalArgumentException("Cant add twice kill listener to player"); } _onKillListener = new PlayerOnKillListenerImpl(); _player.addListener(_onKillListener); }
/** * Add player to get notification of characters death * * @param player : L2Character of the character to get notification of death */ public void addNotifyOfDeath(Player player, boolean withPet) { OnDeathListenerImpl listener = new OnDeathListenerImpl(); player.addListener(listener); if (withPet) { for (Summon summon : player.getSummonList()) { summon.addListener(listener); } } }