Added final-wave per-arena setting.
This commit is contained in:
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
name: MobArena
|
name: MobArena
|
||||||
main: com.garbagemule.MobArena.MobArena
|
main: com.garbagemule.MobArena.MobArena
|
||||||
version: 0.94.3.23
|
version: 0.94.3.24
|
||||||
softdepend: [Spout,Permissions,MultiVerse,XcraftGate,Towny,Heroes,MagicSpells]
|
softdepend: [Spout,Permissions,MultiVerse,XcraftGate,Towny,Heroes,MagicSpells]
|
||||||
commands:
|
commands:
|
||||||
ma:
|
ma:
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public class Arena
|
|||||||
protected String logging;
|
protected String logging;
|
||||||
|
|
||||||
// Wave/reward/entryfee fields
|
// 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 MASpawnThread spawnThread;
|
||||||
protected Map<Integer,List<ItemStack>> everyWaveMap, afterWaveMap;
|
protected Map<Integer,List<ItemStack>> everyWaveMap, afterWaveMap;
|
||||||
protected Map<Player,String> classMap;
|
protected Map<Player,String> classMap;
|
||||||
@@ -901,6 +901,7 @@ public class Arena
|
|||||||
waveInterval = config.getInt(arenaPath + "wave-interval", 20) * 20;
|
waveInterval = config.getInt(arenaPath + "wave-interval", 20) * 20;
|
||||||
specialModulo = config.getInt(arenaPath + "special-modulo", 4);
|
specialModulo = config.getInt(arenaPath + "special-modulo", 4);
|
||||||
maxIdleTime = config.getInt(arenaPath + "max-idle-time", 0) * 20;
|
maxIdleTime = config.getInt(arenaPath + "max-idle-time", 0) * 20;
|
||||||
|
finalWave = config.getInt(arenaPath + "final-wave", 0);
|
||||||
|
|
||||||
everyWaveMap = MAUtils.getArenaRewardMap(config, configName, "every");
|
everyWaveMap = MAUtils.getArenaRewardMap(config, configName, "every");
|
||||||
afterWaveMap = MAUtils.getArenaRewardMap(config, configName, "after");
|
afterWaveMap = MAUtils.getArenaRewardMap(config, configName, "after");
|
||||||
|
|||||||
@@ -74,6 +74,14 @@ public class MASpawnThread implements Runnable
|
|||||||
// Detonate creepers if needed
|
// Detonate creepers if needed
|
||||||
detonateCreepers(arena.detCreepers);
|
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
|
// Find the wave to spawn
|
||||||
spawnWave(wave);
|
spawnWave(wave);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user