if (Bukkit.getOnlinePlayers().size() >= 5) {
if (Tasks.RC_TIME >= 3) {
Tasks.RC_TIME = 0;
int x = (int)(Main.ARENA_MID.getX() + Math.random() * Main.ARENA_RADIUS * 0.75D * ((Math.random() < 0.5D) ? -1 : true));
int z = (int)(Main.ARENA_MID.getZ() + Math.random() * Main.ARENA_RADIUS * 0.75D * ((Math.random() < 0.5D) ? -1 : true));
double r = Math.random();
if (r < 0.25D) {
RareCrate.activate(new Location(Bukkit.getWorld("world"), x, Bukkit.getWorld("world").getHighestBlockYAt(x, z), z));
Bukkit.broadcastMessage(ChatColor.GOLD + "A crate has been discovered at x:" + x + ", z:" + z + "! Collecting it will credit you crates!");
} else if (r >= 0.25D && r <= 0.5D) {
RareLevel.activate(new Location(Bukkit.getWorld("world"), x, Bukkit.getWorld("world").getHighestBlockYAt(x, z), z));
Bukkit.broadcastMessage(ChatColor.AQUA + "A Level Powerup has been discovered at x:" + x + ", z:" + z + "! Collecting it will credit you 1 level!");
} else if (r >= 0.5D) {
RareCoin.activate(new Location(Bukkit.getWorld("world"), x, Bukkit.getWorld("world").getHighestBlockYAt(x, z), z));
Bukkit.broadcastMessage(ChatColor.YELLOW + "A rare coin has been discovered at x:" + x + ", z:" + z + "! Collecting it will credit you up to 10000 coins!");
}
}
Ive been updating a plugin for MC that someone else abandoned, and cannot figure out this. At the end of
line 4:
int x = (int)(Main.ARENA_MID.getX() + Math.random() * Main.ARENA_RADIUS * 0.75D * ((Math.random() < 0.5D) ? -1 : true));
most specifically the ? -1 : true
and what that means?