public static void changeItems(InterfaceGUI i, int id) { int pointer = 0; int[] items; switch (id) { case 0: items = Util.BRONZE; break; case 1: items = Util.IRON; break; case 2: items = Util.STEEL; break; case 3: items = Util.MITH; break; case 4: items = Util.ADDY; break; case 5: items = Util.RUNE; break; default: items = Util.IRON; break; } for (RSGuiModels c : i.buttons) { if (c instanceof ISprite) { ISprite sprite = (ISprite) c; sprite.spriteID = items[pointer++]; } } }