public static void drawString(String string, float x, float y, float z, float scale, boolean centered)
	{
		texture.bind();
		
		if(string.length() == 0)
			return;
		
		scale /= 1000;
		x-= (Main.WIDTH/2 + 350) * scale;
		y-= (Main.HEIGHT + 260) * scale;
		
		float currentXOffset = 0;
		float currentYOffset = 0;
		float centeredOffset = 0;
		
		if(centered)
		{
			float temp = 0;
			for(int i = 0; i < string.length(); i++)
				temp += glyphs.get(string.charAt(i)).getWidth() * scale + spacingX * scale;
			centeredOffset = -temp/2;
		}
		
		for(int i = 0; i < string.length(); i++)
		{
			char character = string.charAt(i);
			
			if(character == '\n')
			{
				currentYOffset -= glyphHeight * scale + spacingY;
				centeredOffset = 0;
				continue;
			}
			
			if(!glyphs.containsKey(character))
				continue;
			
			
			Glyph glyph = glyphs.get(character);
			glyph.render(x + currentXOffset + centeredOffset, y + currentYOffset, z, scale);
			currentXOffset += glyph.getWidth() * scale + spacingX * scale;
		}
	}