@EventHandler
	public void respawn(PlayerRespawnEvent event){
		Player p = event.getPlayer();
		
	
		if(plugin.getConfig().contains("Jailed." + p.getUniqueId().toString())){
			double x =  (double) plugin.getConfig().get("Jail.X");
			double y =  (double) plugin.getConfig().get("Jail.y");
			double z =  (double) plugin.getConfig().get("Jail.z");
			Location loc = new Location(p.getWorld(), x,y,z);
			p.teleport(loc);
			event.setRespawnLocation(loc);
		}
		
		if(PendingTrial.contains(p.getUniqueId())){
			double x =  (double) plugin.getConfig().get("Jail.X");
			double y =  (double) plugin.getConfig().get("Jail.y");
			double z =  (double) plugin.getConfig().get("Jail.z");
			Location loc = new Location(p.getWorld(), x,y,z);
			p.teleport(loc);
			event.setRespawnLocation(loc);
			FiddyCraft.setJailSentence(p,2000);
			PendingTrial.remove(p.getUniqueId());
			plugin.getConfig().set("Jailed."+ p.getUniqueId().toString(), 2000);
			p.sendMessage(ChatColor.RED + "You have been sent to jail if you wish you can have a trial or simply plead guilty and skip it");
			
		}
		
		if(p.hasPermission("FiddyCraft.noob")){
			double xs =  (double) plugin.getConfig().getDouble("Location." + "Spawn.X");
			double ys =  (double) plugin.getConfig().getDouble("Location." + "Spawn.Y");
			double zs =  (double) plugin.getConfig().getDouble("Location." + "Spawn.Z");
			Location loc = new Location(p.getWorld(), xs,ys,zs);
			p.teleport(loc);
			event.setRespawnLocation(loc);
		}
		
		if(PVPDeath.contains(p.getUniqueId())){
			
			
			String causeOfDeath = p.getLastDamageCause().getCause().name();
			ItemStack book = new ItemStack(Material.WRITTEN_BOOK);
			BookMeta bm = (BookMeta) book.getItemMeta();
			String timeStamp = new SimpleDateFormat("yyyy/MM/dd HH:mm").format(Calendar.getInstance().getTime());
			bm.setAuthor("Doctor");
			bm.setTitle("Death Certificate");
			bm.addPage("");
			bm.setPage(1, ChatColor.RED+ "Victim: " + ChatColor.BLACK + p.getName()  + "\n" + "\n" +
					    ChatColor.RED+ "Cause of Death: "+ChatColor.BLACK + causeOfDeath + 
					   "\n" +"\n"+ ChatColor.RED+"Time of Death: " +ChatColor.BLACK +timeStamp);
					   
			book.getItemMeta().setDisplayName(ChatColor.RED+ "Death Certificate");
			book.setItemMeta(bm);
			p.setItemInHand(book);
			p.sendMessage(ChatColor.DARK_RED + "You have been murderd by a player, report your death by droping it off at your local police station");
			PVPDeath.remove(p.getUniqueId());
		}
		
	}