mirror of
https://github.com/garbagemule/MobArena.git
synced 2025-01-11 19:00:38 +01:00
Add per-arena option: display-waves-as-level
If true, this option will cause wave numbers to be displayed as the players' level to aid in wave tracking. It does NOT replace the announcements, which can still be disabled by putting blank values in the announcements-file.
This commit is contained in:
parent
68d0c51492
commit
ef3b1b42cc
@ -34,3 +34,4 @@ player-time-in-arena: world
|
||||
auto-ignite-tnt: false
|
||||
auto-start-timer: 0
|
||||
use-class-chests: false
|
||||
display-waves-as-level: false
|
||||
|
@ -35,7 +35,7 @@ public class MASpawnThread implements Runnable
|
||||
private MonsterManager monsterManager;
|
||||
|
||||
private int playerCount, monsterLimit;
|
||||
private boolean waveClear, bossClear, preBossClear;
|
||||
private boolean waveClear, bossClear, preBossClear, wavesAsLevel;
|
||||
|
||||
/**
|
||||
* Create a new monster spawner for the input arena.
|
||||
@ -65,6 +65,7 @@ public class MASpawnThread implements Runnable
|
||||
waveClear = arena.getSettings().getBoolean("clear-wave-before-next", false);
|
||||
bossClear = arena.getSettings().getBoolean("clear-boss-before-next", false);
|
||||
preBossClear = arena.getSettings().getBoolean("clear-wave-before-boss", false);
|
||||
wavesAsLevel = arena.getSettings().getBoolean("display-waves-as-level", false);
|
||||
}
|
||||
|
||||
public void run() {
|
||||
@ -126,6 +127,14 @@ public class MASpawnThread implements Runnable
|
||||
Wave w = waveManager.next();
|
||||
|
||||
w.announce(arena, wave);
|
||||
|
||||
// Set the players' level to the wave number
|
||||
if (wavesAsLevel) {
|
||||
for (Player p : arena.getPlayersInArena()) {
|
||||
p.setLevel(wave);
|
||||
p.setExp(0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
if (w.getType() == WaveType.UPGRADE) {
|
||||
handleUpgradeWave(w);
|
||||
|
Loading…
Reference in New Issue
Block a user