tomt
-
Posts
0 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by tomt
-
-
that shouldn't be a big task as you would just half to on death make the system randomly pick from a list of spawn points. just example havent dug into it yet but somthing like.
HashMap spawns = new HashMap();
Set spawn = this.getConfig().getConfigurationSection("spawn")
.getKeys(false);
int i = 0;
for (String s : spawn) {
String path = "spawn." + s + ".";
spawns.put(i, toLocation(getConfig().getString(path + "location")));
i++;
}
public static Location toLocation(String s) {
String[] file = s.split(";");
World w = Bukkit.getWorld(file[0]);
double x = Double.parseDouble(file[1]);
double y = Double.parseDouble(file[2]);
double z = Double.parseDouble(file[3]);
if (file.length == 6) {
return new Location(w, x, y, z, Float.parseFloat(file[4]),
Float.parseFloat(file[5]));
}
return new Location(w, x, y, z);
}
I dout this will work as i haven't looked all way into it but something like this.
Willing to pay for help
in Collaboration and Networking
Posted
toajazzy did you ever get your help? and what are you looking to be done