Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- }
- else if (a.equalsIgnoreCase("setspawn")) {
- if (p.hasPermission("wh.admin.setspawn")) {
- Location loc = p.getLocation();
- p.getWorld().setSpawnLocation((int)loc.getX(), (int)loc.getY(), (int)loc.getZ());
- settings.getData().set("spawn.world", p.getLocation().getWorld().getName());
- settings.getData().set("spawn.x", p.getLocation().getX());
- settings.getData().set("spawn.y", p.getLocation().getY());
- settings.getData().set("spawn.z", p.getLocation().getZ());
- settings.getData().set("spawn.yaw", p.getLocation().getYaw());
- settings.getData().set("spawn.Pitch", p.getLocation().getPitch());
- settings.saveData();
- p.sendMessage(this.prefix + ChatColor.RED + "You have Set the spawn!");
- }
- else if (getConfig().getBoolean("Show-Permission-Message")) {
- p.sendMessage(this.perm);
- }
- else if (a.equalsIgnoreCase("spawn")) {
- if (getConfig().getBoolean("SpawnCommand")) {
- World w = Bukkit.getServer().getWorld(settings.getData().getString("spawn.world"));
- double x = settings.getData().getDouble("spawn.x");
- double y = settings.getData().getDouble("spawn.y");
- double z = settings.getData().getDouble("spawn.z");
- //double yaw = settings.getData().getDouble("spawn.yaw");
- //double pitch = settings.getData().getDouble("spawn.Pitch");
- Location location = new Location(w, x, y, z);
- p.teleport(location);
- p.sendMessage(this.prefix + ChatColor.RED + "Teleported to spawn");
- }
- else if (getConfig().getBoolean("Show-Permission-Message")) {
- p.sendMessage(this.perm);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment