Add global end announcement feature.

This commit is contained in:
garbagemule 2013-07-28 14:21:40 +02:00
parent 77899a4e7f
commit 859baf7b71
3 changed files with 9 additions and 1 deletions

View File

@ -38,3 +38,4 @@ use-class-chests: false
display-waves-as-level: false
display-timer-as-level: false
use-scoreboards: true
global-end-announce: false

View File

@ -495,7 +495,13 @@ public class ArenaImpl implements Arena
stopSpawner();
// Announce and clean arena floor, etc.
Messenger.tellAll(this, Msg.ARENA_END, true);
if (settings.getBoolean("global-end-announce", false)) {
for (Player p : Bukkit.getOnlinePlayers()) {
Messenger.tellPlayer(p, Msg.ARENA_END_GLOBAL, configName());
}
} else {
Messenger.tellAll(this, Msg.ARENA_END, true);
}
cleanup();
// Restore region.

View File

@ -6,6 +6,7 @@ public enum Msg
{
ARENA_START("Let the slaughter begin!", "Arena started!", Material.REDSTONE_TORCH_ON),
ARENA_END("Arena finished.", "Arena finished.", Material.REDSTONE_TORCH_OFF),
ARENA_END_GLOBAL("Arena '%' finished! Type /ma j % to join a new game!"),
ARENA_DOES_NOT_EXIST("That arena does not exist. Type /ma arenas for a list.", "Can't find arena."),
ARENA_LBOARD_NOT_FOUND("That arena does not have a leaderboard set up."),
ARENA_AUTO_START("Arena will auto-start in % seconds."),