Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if(args[0].equalsIgnoreCase("setspawn")) {
- FileConfiguration config = plugin.getConfig();
- Location l = jugador.getLocation();
- double x = l.getX();
- double y = l.getY();
- double z = l.getZ();
- float yaw = l.getYaw();
- float pitch = l.getYaw();
- String world = jugador.getWorld().getName();
- config.set("Config.Spawn.x", x);
- config.set("Config.Spawn.y", y);
- config.set("Config.Spawn.z", z);
- config.set("Config.Spawn.yaw", yaw);
- config.set("Config.Spawn.pitch", pitch);
- config.set("Config.Spawn.world", world);
- jugador.sendMessage("Se ha pusto el spawn correctsmente!");
- return true;
- }
- else if(args[0].equalsIgnoreCase("spawn")) {
- FileConfiguration config = plugin.getConfig();
- double x = Double.valueOf(config.getString("Config.Spawn.x"));
- double y = Double.valueOf(config.getString("Config.Spawn.y"));
- double z = Double.valueOf(config.getString("Config.Spawn.z"));
- float yaw = Float.valueOf(config.getString("Config.Spawn.yaw"));
- float pitch = Float.valueOf(config.getString("Config.Spawn.pitch"));
- World world = plugin.getServer().getWorld("Config.Spawn.world");
- Location l = new Location(world, x, y, z, yaw, pitch);
- jugador.teleport(l);
- jugador.sendMessage("te has teletranspotado correctamente!");
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement