mirror of
https://github.com/garbagemule/MobArena.git
synced 2025-02-24 00:11:36 +01:00
Added final-wave per-arena setting.
This commit is contained in:
parent
9161bead55
commit
c9b9587ce9
BIN
MobArena.jar
BIN
MobArena.jar
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
name: MobArena
|
||||
main: com.garbagemule.MobArena.MobArena
|
||||
version: 0.94.3.23
|
||||
version: 0.94.3.24
|
||||
softdepend: [Spout,Permissions,MultiVerse,XcraftGate,Towny,Heroes,MagicSpells]
|
||||
commands:
|
||||
ma:
|
||||
|
@ -76,7 +76,7 @@ public class Arena
|
||||
protected String logging;
|
||||
|
||||
// Wave/reward/entryfee fields
|
||||
protected int spawnTaskId, sheepTaskId, waveDelay, waveInterval, specialModulo, spawnMonstersInt, maxIdleTime;
|
||||
protected int spawnTaskId, sheepTaskId, waveDelay, waveInterval, specialModulo, spawnMonstersInt, maxIdleTime, finalWave;
|
||||
protected MASpawnThread spawnThread;
|
||||
protected Map<Integer,List<ItemStack>> everyWaveMap, afterWaveMap;
|
||||
protected Map<Player,String> classMap;
|
||||
@ -901,6 +901,7 @@ public class Arena
|
||||
waveInterval = config.getInt(arenaPath + "wave-interval", 20) * 20;
|
||||
specialModulo = config.getInt(arenaPath + "special-modulo", 4);
|
||||
maxIdleTime = config.getInt(arenaPath + "max-idle-time", 0) * 20;
|
||||
finalWave = config.getInt(arenaPath + "final-wave", 0);
|
||||
|
||||
everyWaveMap = MAUtils.getArenaRewardMap(config, configName, "every");
|
||||
afterWaveMap = MAUtils.getArenaRewardMap(config, configName, "after");
|
||||
|
@ -74,6 +74,14 @@ public class MASpawnThread implements Runnable
|
||||
// Detonate creepers if needed
|
||||
detonateCreepers(arena.detCreepers);
|
||||
|
||||
// Check if this is the final wave, in which case, end instead of spawn
|
||||
if (wave > 1 && wave == arena.finalWave)
|
||||
{
|
||||
for (Player p : arena.arenaPlayers)
|
||||
arena.playerDeath(p);
|
||||
return;
|
||||
}
|
||||
|
||||
// Find the wave to spawn
|
||||
spawnWave(wave);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user