@SuppressWarnings("unchecked")
	public void gainedGrace(Player player, AGPlayer agp, God god, Praying praying) {
		
		//calculating if player gets grace randomly
		double random = Math.random()*100;
		if(random <= praying.getChance()) {
			
			//exp as benefit
			if(praying.getBenefit().getString("type").equalsIgnoreCase("EXP"))
				player.giveExp(praying.getBenefit().getInt("amount"));
			//cmd as benefit
			else if(praying.getBenefit().getString("type").equalsIgnoreCase("CMD"))
				Bukkit.dispatchCommand(Bukkit.getConsoleSender(), praying.getBenefit().getString("cmd").replace("%player%", player.getName()));
			//the normal item
			else {
				Map<String, Object> item = null;
				if(!(praying.getBenefit() instanceof LinkedHashMap)) {
					if(!(praying.getBenefit() instanceof MemorySection))
						plugin.getLogger().warning("Error while giving player grace benefit, item is not properly configured!");
					else {
						Map<String, Object> map = ((MemorySection) praying.getBenefit()).getValues(false);
						item = map;
					}
				}
				else
					item = (LinkedHashMap<String, Object>) praying.getBenefit();
				
				if(item == null)
					plugin.getLogger().warning("Error while giving player grace benefit, item is not properly configured!");
				else {
					try {
						player.getInventory().addItem(ItemStack.deserialize(item));
					} catch(NullPointerException e) {plugin.getLogger().warning("Error while giving player grace benefit, item is not properly configured!");}
				}
			}
			
			Messenger.sendMessage(player, Message.gainedGrace, "%god%", god.getDisplayname());
		//chance to get grace missed
		} else {
			Messenger.sendMessage(player, Message.noGrace, "%god%", god.getDisplayname());
		}
	}