Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void setLocation(String arenaname, String name, Player p)
- {
- Location loc = p.getLocation();
- String world = loc.getWorld().getName();
- double x = loc.getX();
- double y = loc.getY();
- double z = loc.getZ();
- float yaw = loc.getYaw();
- float pitch = loc.getPitch();
- cfg.set("maps." + arenaname + "." + name + ".world", world);
- cfg.set("maps." + arenaname + "." + name + ".x", Double.valueOf(x));
- cfg.set("maps." + arenaname + "." + name + ".y", Double.valueOf(y));
- cfg.set("maps." + arenaname + "." + name + ".z", Double.valueOf(z));
- cfg.set("maps." + arenaname + "." + name + ".yaw", Float.valueOf(yaw));
- cfg.set("maps." + arenaname + "." + name + ".pitch", Float.valueOf(pitch));
- try
- {
- cfg.save(file);
- p.sendMessage(Main.prefix + "§a" + name + " §7wurde erfolgreich gesetzt.");
- }
- catch (IOException e)
- {
- e.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement