public static void save(Player player){
		int posx, posy, mapId, level, gold;
		posx = player.getPosX();
		posy = player.getPosY();
		mapId = RPG372.gameInstance.getMap().getId();
		level = player.getPD().getLevel();
		gold = player.getPD().getInv().getGold();
		QueryExecutor qe = new QueryExecutor();
		qe.updateQuery("UPDATE RPG372DB_Player SET posX = " + posx + ",posY = " + posy + 
				",mapID = " + mapId + ",level = " + level + ",gold = " + gold 
				+ " WHERE userID = " + userId);
		PlayerInventory plinv = player.getPD().getInv();
		qe.SendQuery("SELECT invID FROM RPG372DB_Player WHERE userID = " + userId );
		int invId = Integer.parseInt(qe.getFirst().get(0));
		for(int i = 0 ; i < 18 ; i++){
			if(i < 16){
				int itemID = 0 ;
				if(plinv.getItem(i) != null)
					itemID = plinv.getItem(i).getId();
				qe.updateQuery("UPDATE RPG372DB_Inventory SET itemID = " + itemID +
						" WHERE invID = " + invId + " AND slotID = " + i );
			}else if(i == 16){
				int itemID = 0 ;
				if(plinv.getEqarmor() != null)
					itemID = plinv.getEqarmor().getId();
				qe.updateQuery("UPDATE RPG372DB_Inventory SET itemID = " + itemID +
						" WHERE invID = " + invId + " AND slotID = " + i );
			}else if(i == 17){
				int itemID = 0 ;
				if(plinv.getEqweapon() != null)
					itemID = plinv.getEqweapon().getId();
				qe.updateQuery("UPDATE RPG372DB_Inventory SET itemID = " + itemID +
						" WHERE invID = " + invId + " AND slotID = " + i );
			}
		}

	}