Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if(subcmd.equalsIgnoreCase( "teamspawn" )) //eventset teamspawn
- {
- ConfigurationSection section = this.getConfig().getConfigurationSection( "root.teamspawn" );
- String teamspawn = args[1];
- if(sender.hasPermission("event.set.teamspawn") )
- {
- if(!section.contains( teamspawn )) //MR ERROR LINE########################
- {
- String world = player.getLocation().getWorld().getName();
- double x = player.getLocation().getX();
- double y = player.getLocation().getY();
- double z = player.getLocation().getZ();
- double yaw = player.getLocation().getYaw();
- double pitch = player.getLocation().getPitch();
- this.getConfig().set("root.teamspawn." + args[1] + "-" + ".world", world);
- this.getConfig().set("root.teamspawn." + args[1] + "-" + ".x", x);
- this.getConfig().set("root.teamspawn." + args[1] + "-" + ".y", y);
- this.getConfig().set("root.teamspawn." + args[1] + "-" + ".z", z);
- this.getConfig().set("root.teamspawn." + args[1] + "-" + ".yaw", yaw);
- this.getConfig().set("root.teamspawn." + args[1] + "-" + ".pitch", pitch);
- this.saveConfig();
- player.sendMessage(ChatColor.GOLD + "Teamspawn " + ChatColor.RED + args[1] + ChatColor.GOLD + " set!");
- }
- else
- {
- player.sendMessage(ChatColor.RED + "That teamspawn already exists!");
- }
- }
- else
- {
- player.sendMessage(ChatColor.RED + "You dont have permission");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment