mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-23 02:55:46 +01:00
Add boss wave on-kill announcements
This commit adds two new announcements for use in boss waves: - wave-boss-killed to announce who killed the boss - wave-boss-reward-earned to notify the killer of the boss reward, if any Fixes #428
This commit is contained in:
parent
3f3d611731
commit
780883fce7
@ -607,13 +607,13 @@ public class ArenaListener
|
||||
}
|
||||
MABoss boss = monsters.getBoss(damagee);
|
||||
if (boss != null) {
|
||||
for (Player q : arena.getPlayersInArena()) {
|
||||
arena.getMessenger().tell(q, Msg.WAVE_BOSS_KILLED, p.getName());
|
||||
}
|
||||
Thing reward = boss.getReward();
|
||||
if (reward != null) {
|
||||
arena.getRewardManager().addReward(p, reward);
|
||||
String msg = p.getName() + " killed the boss and won: " + reward;
|
||||
for (Player q : arena.getPlayersInArena()) {
|
||||
arena.getMessenger().tell(q, msg);
|
||||
}
|
||||
arena.getMessenger().tell(damager, Msg.WAVE_BOSS_REWARD_EARNED, reward.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -71,6 +71,8 @@ public enum Msg {
|
||||
WAVE_BOSS("Wave &b#%&r! [BOSS]"),
|
||||
WAVE_BOSS_ABILITY("Boss used ability: &c%&r!"),
|
||||
WAVE_BOSS_LOW_HEALTH("Boss is almost dead!"),
|
||||
WAVE_BOSS_KILLED("&a%&r killed the boss!"),
|
||||
WAVE_BOSS_REWARD_EARNED("You earned: &e%"),
|
||||
WAVE_REWARD("You just earned a reward: &e%&r"),
|
||||
MISC_LIST_PLAYERS("Live players: &a%&r"),
|
||||
MISC_LIST_ARENAS("Available arenas: %"),
|
||||
|
Loading…
Reference in New Issue
Block a user