Added world restrictions
This commit is contained in:
		@@ -25,34 +25,36 @@ public class Chests implements Listener {
 | 
			
		||||
		Block block = event.getClickedBlock();
 | 
			
		||||
		Player p = event.getPlayer();
 | 
			
		||||
		if(p.getItemInHand().getType()== Material.BLAZE_ROD && event.getAction() == Action.LEFT_CLICK_BLOCK){
 | 
			
		||||
			if(block.getState() instanceof Chest){
 | 
			
		||||
				if(p.hasPermission("HungerArena.Chest.Store")){
 | 
			
		||||
					ItemStack[] itemsinchest = ((Chest) block.getState()).getInventory().getContents();
 | 
			
		||||
					int blockx = block.getX();
 | 
			
		||||
					int blocky = block.getY();
 | 
			
		||||
					int blockz = block.getZ();
 | 
			
		||||
					String blockw = block.getWorld().getName().toString();
 | 
			
		||||
					if(!plugin.getConfig().contains("Storage." + blockx + "," + blocky + "," + blockz + ".Location.X")){
 | 
			
		||||
						plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".Location.X", blockx);
 | 
			
		||||
						plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".Location.Y", blocky);
 | 
			
		||||
						plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".Location.Z",blockz);
 | 
			
		||||
						plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".Location.W", blockw);
 | 
			
		||||
						plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".ItemsInStorage", itemsinchest);
 | 
			
		||||
			if(!plugin.restricted || (plugin.restricted && plugin.config.getStringList("worlds").contains(p.getWorld().toString()))){
 | 
			
		||||
				if(block.getState() instanceof Chest){
 | 
			
		||||
					if(p.hasPermission("HungerArena.Chest.Store")){
 | 
			
		||||
						ItemStack[] itemsinchest = ((Chest) block.getState()).getInventory().getContents();
 | 
			
		||||
						int blockx = block.getX();
 | 
			
		||||
						int blocky = block.getY();
 | 
			
		||||
						int blockz = block.getZ();
 | 
			
		||||
						String blockw = block.getWorld().getName().toString();
 | 
			
		||||
						if(!plugin.getConfig().contains("Storage." + blockx + "," + blocky + "," + blockz + ".Location.X")){
 | 
			
		||||
							plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".Location.X", blockx);
 | 
			
		||||
							plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".Location.Y", blocky);
 | 
			
		||||
							plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".Location.Z",blockz);
 | 
			
		||||
							plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".Location.W", blockw);
 | 
			
		||||
							plugin.getConfig().addDefault("Storage." + blockx + "," + blocky + "," + blockz + ".ItemsInStorage", itemsinchest);
 | 
			
		||||
						}else{
 | 
			
		||||
							plugin.getConfig().set("Storage." + blockx + "," + blocky+ "," + blockz + ".Location.X",blockx);
 | 
			
		||||
							plugin.getConfig().set("Storage." + blockx + "," + blocky + "," + blockz + ".Location.Y", blocky);
 | 
			
		||||
							plugin.getConfig().set("Storage." + blockx + "," + blocky + "," + blockz + ".Location.Z", blockz);
 | 
			
		||||
							plugin.getConfig().set("Storage." + blockx + "," + blocky + "," + blockz + ".Location.W", blockw);
 | 
			
		||||
							plugin.getConfig().set("Storage." + blockx + "," + blocky + "," + blockz + ".ItemsInStorage", itemsinchest);
 | 
			
		||||
						}
 | 
			
		||||
						List<String> list2 = plugin.getConfig().getStringList("StorageXYZ");
 | 
			
		||||
						list2.add(blockx + "," + blocky + "," + blockz);
 | 
			
		||||
						plugin.getConfig().set("StorageXYZ", list2);
 | 
			
		||||
						plugin.getConfig().options().copyDefaults(true);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.GREEN + "Chest Stored!");
 | 
			
		||||
					}else{
 | 
			
		||||
						plugin.getConfig().set("Storage." + blockx + "," + blocky+ "," + blockz + ".Location.X",blockx);
 | 
			
		||||
						plugin.getConfig().set("Storage." + blockx + "," + blocky + "," + blockz + ".Location.Y", blocky);
 | 
			
		||||
						plugin.getConfig().set("Storage." + blockx + "," + blocky + "," + blockz + ".Location.Z", blockz);
 | 
			
		||||
						plugin.getConfig().set("Storage." + blockx + "," + blocky + "," + blockz + ".Location.W", blockw);
 | 
			
		||||
						plugin.getConfig().set("Storage." + blockx + "," + blocky + "," + blockz + ".ItemsInStorage", itemsinchest);
 | 
			
		||||
						p.sendMessage(ChatColor.RED + "You don't have permission to store chests!");
 | 
			
		||||
					}
 | 
			
		||||
					List<String> list2 = plugin.getConfig().getStringList("StorageXYZ");
 | 
			
		||||
					list2.add(blockx + "," + blocky + "," + blockz);
 | 
			
		||||
					plugin.getConfig().set("StorageXYZ", list2);
 | 
			
		||||
					plugin.getConfig().options().copyDefaults(true);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.GREEN + "Chest Stored!");
 | 
			
		||||
				}else{
 | 
			
		||||
					p.sendMessage(ChatColor.RED + "You don't have permission to store chests!");
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
@@ -75,9 +77,9 @@ public class Chests implements Listener {
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage("Chest Removed!");
 | 
			
		||||
				} else {
 | 
			
		||||
                                    event.setCancelled(true);
 | 
			
		||||
                                    p.sendMessage(ChatColor.RED + "[HungerArena] That's a storage chest! You don't have permission to break it!");
 | 
			
		||||
                                }
 | 
			
		||||
					event.setCancelled(true);
 | 
			
		||||
					p.sendMessage(ChatColor.RED + "[HungerArena] That's a storage chest! You don't have permission to break it!");
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -41,6 +41,7 @@ public class Main extends JavaPlugin{
 | 
			
		||||
	public CommandExecutor SpawnsCommand = new SpawnsCommand(this);
 | 
			
		||||
	public boolean canjoin;
 | 
			
		||||
	public boolean exists;
 | 
			
		||||
	public boolean restricted;
 | 
			
		||||
	public FileConfiguration config;
 | 
			
		||||
	public ItemStack Reward;
 | 
			
		||||
	public ItemStack Cost;
 | 
			
		||||
@@ -89,6 +90,11 @@ public class Main extends JavaPlugin{
 | 
			
		||||
		}
 | 
			
		||||
		Reward = new ItemStack(config.getInt("Reward.ID"), config.getInt("Reward.Amount"));
 | 
			
		||||
		Cost = new ItemStack(config.getInt("Sponsor_Cost.ID"), config.getInt("Sponsor_Cost.Amount"));
 | 
			
		||||
		if(config.getStringList("worlds").isEmpty()){
 | 
			
		||||
			restricted = false;
 | 
			
		||||
		}else if(!config.getStringList("worlds").isEmpty()){
 | 
			
		||||
			restricted = true;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	public void onDisable(){
 | 
			
		||||
 
 | 
			
		||||
@@ -18,222 +18,228 @@ public class SpawnsCommand implements CommandExecutor {
 | 
			
		||||
		Player p = (Player) sender;
 | 
			
		||||
		if(cmd.getName().equalsIgnoreCase("StartPoint")){
 | 
			
		||||
			if(p.hasPermission("HungerArena.StartPoint")){
 | 
			
		||||
				Location ploc = p.getLocation().getBlock().getLocation();
 | 
			
		||||
				if(args[0].equalsIgnoreCase("1")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_one_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute one!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("2")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_two_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute two!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("3")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_three_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute three!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("4")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_four_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute four!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("5")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_five_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute five!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("6")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_six_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute six!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("7")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_seven_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute seven!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("8")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_eight_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eight!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("9")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_nine_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute nine!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("10")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_ten_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute ten!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("11")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_eleven_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eleven!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("12")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_twelve_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twelve!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("13")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_thirteen_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute thirteen!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("14")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_fourteen_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute fourteen!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("15")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_fifteen_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute fifteen!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("16")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_sixteen_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute sixteen!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("17")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_seventeen_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute seventeen!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("18")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_eighteen_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eighteen!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("19")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_nineteen_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute nineteen!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("20")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_twenty_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twenty!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("21")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_twentyone_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentyone!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("22")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_twentytwo_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentytwo!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("23")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_twentythree_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentythree!");
 | 
			
		||||
				}
 | 
			
		||||
				if(args[0].equalsIgnoreCase("24")){
 | 
			
		||||
					double x = ploc.getX();
 | 
			
		||||
					double y = ploc.getY();
 | 
			
		||||
					double z = ploc.getZ();
 | 
			
		||||
					String w = ploc.getWorld().getName();
 | 
			
		||||
					plugin.config.set("Tribute_twentyfour_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
					plugin.saveConfig();
 | 
			
		||||
					p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentyfour!");
 | 
			
		||||
				if(!plugin.restricted || (plugin.restricted && plugin.config.getStringList("worlds").contains(p.getWorld().toString()))){
 | 
			
		||||
					if(plugin.restricted && !plugin.config.getStringList("worlds").contains(p.getWorld().toString())){
 | 
			
		||||
						p.sendMessage(ChatColor.GOLD + "We ran the command, however, this isn't a world you defined in the config...");
 | 
			
		||||
						p.sendMessage(ChatColor.GOLD + "If this is the right world, please disregard this message.");
 | 
			
		||||
					}
 | 
			
		||||
					Location ploc = p.getLocation().getBlock().getLocation();
 | 
			
		||||
					if(args[0].equalsIgnoreCase("1")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_one_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute one!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("2")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_two_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute two!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("3")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_three_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute three!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("4")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_four_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute four!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("5")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_five_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute five!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("6")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_six_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute six!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("7")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_seven_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute seven!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("8")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_eight_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eight!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("9")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_nine_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute nine!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("10")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_ten_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute ten!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("11")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_eleven_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eleven!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("12")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_twelve_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twelve!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("13")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_thirteen_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute thirteen!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("14")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_fourteen_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute fourteen!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("15")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_fifteen_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute fifteen!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("16")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_sixteen_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute sixteen!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("17")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_seventeen_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute seventeen!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("18")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_eighteen_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute eighteen!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("19")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_nineteen_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute nineteen!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("20")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_twenty_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twenty!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("21")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_twentyone_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentyone!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("22")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_twentytwo_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentytwo!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("23")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_twentythree_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentythree!");
 | 
			
		||||
					}
 | 
			
		||||
					if(args[0].equalsIgnoreCase("24")){
 | 
			
		||||
						double x = ploc.getX();
 | 
			
		||||
						double y = ploc.getY();
 | 
			
		||||
						double z = ploc.getZ();
 | 
			
		||||
						String w = ploc.getWorld().getName();
 | 
			
		||||
						plugin.config.set("Tribute_twentyfour_spawn", x + "," + y + "," + z + "," + w);
 | 
			
		||||
						plugin.saveConfig();
 | 
			
		||||
						p.sendMessage(ChatColor.AQUA + "You have set the spawn location of Tribute twentyfour!");
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}else{
 | 
			
		||||
				p.sendMessage(ChatColor.RED + "You don't have permission!");
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,7 @@ public class TeleportListener implements Listener {
 | 
			
		||||
        this.plugin = m;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    @EventHandler
 | 
			
		||||
    /*@EventHandler          Unwanted right now...
 | 
			
		||||
    public void onTP(PlayerTeleportEvent evt) {
 | 
			
		||||
        @SuppressWarnings("unused")
 | 
			
		||||
		Player p = evt.getPlayer();
 | 
			
		||||
@@ -32,6 +32,6 @@ public class TeleportListener implements Listener {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        evt.setCancelled(true);
 | 
			
		||||
    }
 | 
			
		||||
    }*/
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user