Add global first-join announce feature.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
name: MobArena
|
||||
author: garbagemule
|
||||
main: com.garbagemule.MobArena.MobArena
|
||||
version: 0.95.5.3
|
||||
version: 0.95.5.4
|
||||
softdepend: [Spout,Towny,Heroes,MagicSpells,Vault]
|
||||
commands:
|
||||
ma:
|
||||
|
||||
@@ -39,4 +39,5 @@ display-waves-as-level: false
|
||||
display-timer-as-level: false
|
||||
use-scoreboards: true
|
||||
isolated-chat: false
|
||||
global-first-join-announce: false
|
||||
global-end-announce: false
|
||||
|
||||
@@ -559,7 +559,16 @@ public class ArenaImpl implements Arena
|
||||
if (event.isCancelled()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Announce globally (must happen before moving player)
|
||||
if (settings.getBoolean("global-first-join-announce", false)) {
|
||||
if (lobbyPlayers.isEmpty()) {
|
||||
for (Player q : Bukkit.getOnlinePlayers()) {
|
||||
Messenger.tellPlayer(q, Msg.ARENA_JOIN_GLOBAL, configName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
takeFee(p);
|
||||
storePlayerData(p, loc);
|
||||
removePotionEffects(p);
|
||||
|
||||
@@ -7,6 +7,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_JOIN_GLOBAL("Arena '%' is about to start! Type /ma j % to join!"),
|
||||
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