This commit is contained in:
Mysticate 2015-07-29 11:52:44 -06:00
parent c5cf306097
commit ab49407584

View File

@ -33,6 +33,8 @@ import nautilus.game.arcade.game.games.evolution.mobs.KitSpider;
import nautilus.game.arcade.game.games.evolution.mobs.KitWolf;
import nautilus.game.arcade.kit.Kit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@ -48,6 +50,8 @@ public class Evolution extends SoloGame
private NautHashMap<String, EvoToken> _tokens = new NautHashMap<String, EvoToken>();
private ArrayList<Location> _evoPlatforms = new ArrayList<Location>();
private Objective _evoObj;
public Evolution(ArcadeManager manager)
@ -121,6 +125,16 @@ public class Evolution extends SoloGame
return _evolve;
}
@Override
public void ParseData()
{
for (Location loc : WorldData.GetCustomLocs("Red"))
{
loc.getBlock().setType(Material.AIR);
_evoPlatforms.add(loc);
}
}
//Double Kit
@EventHandler(priority = EventPriority.MONITOR)
public void storeTokens(GameStateChangeEvent event)
@ -144,14 +158,14 @@ public class Evolution extends SoloGame
if (event.GetState() != GameState.Prepare)
return;
if (WorldData.GetCustomLocs("RED").size() <= 0)
if (_evoPlatforms.size() <= 0)
{
Announce(C.cWhite + C.Bold + GetName() + " ended, map not set up properly!");
SetState(GameState.Dead);
return;
}
_evolve = new EvolveManager(this, WorldData.GetCustomLocs("RED").get(0));
_evolve = new EvolveManager(this, _evoPlatforms.get(0));
}
@EventHandler