Add global end announcement feature.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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."),
|
||||
|
||||
Reference in New Issue
Block a user