Forgot to add temple to scheduler.

This commit is contained in:
FabioZumbi12 2015-03-06 03:16:16 -03:00
parent 04fc9765a5
commit 1c2e9e961f

View File

@ -232,6 +232,8 @@ public class AICore {
} }
} }
} }
private void buildCave() { private void buildCave() {
if (HerobrineAI.getPluginCore().getConfigDB().BuildStuff && new Random().nextBoolean() && (Bukkit.getServer().getOnlinePlayers().size() > 0)) { if (HerobrineAI.getPluginCore().getConfigDB().BuildStuff && new Random().nextBoolean() && (Bukkit.getServer().getOnlinePlayers().size() > 0)) {
@ -277,6 +279,21 @@ public class AICore {
} }
} }
} }
private void templeInterval() {
if ((HerobrineAI.getPluginCore().getConfigDB().BuildTemples) &&
(new Random().nextBoolean()) &&
(Bukkit.getServer().getOnlinePlayers().size() > 0)) {
log.info("[HerobrineAI] Finding temple target...");
Player[] AllOnPlayers = Bukkit.getServer().getOnlinePlayers().toArray(new Player[0]);
int player_rolled = Util.getRandomPlayerNum(AllOnPlayers);
if ((HerobrineAI.getPluginCore().getConfigDB().useWorlds.contains(AllOnPlayers[player_rolled].getLocation().getWorld().getName())) &&
(new Random().nextBoolean())) {
Object[] data = { AllOnPlayers[player_rolled] };
getCore(Core.CoreType.TEMPLE).runCore(data);
}
}
}
public void disappearEffect() { public void disappearEffect() {
final Location ploc = AICore.PlayerTarget.getLocation(); final Location ploc = AICore.PlayerTarget.getLocation();
@ -322,11 +339,13 @@ public class AICore {
private void buildInterval() { private void buildInterval() {
if (new Random().nextInt(100) < 75) { if (new Random().nextInt(100) < 75) {
pyramidInterval(); pyramidInterval();
} } else {
if (new Random().nextBoolean()) { templeInterval();
buildCave(); }
} if (new Random().nextBoolean()) {
buildCave();
}
} }
private void startIntervals() { private void startIntervals() {