public CreatePouch(Player player, int buttonId, int amount) { super(1, true); this.player = player; this.buttonId = buttonId; pouchData = PouchData.getByButton(buttonId); this.amount = amount; }
/** Process interface functions */ public static boolean processInterfaceFunctions(Player c, int buttonId) { if (buttonId < 205231 || buttonId > 207109) { return false; } PouchData pouch = PouchData.getByButton(buttonId); if (pouch == null) { return false; } switch (buttonId - pouch.getButtonId()) { case 1: hasRequirements(c, pouch.getButtonId(), true, 5, pouch); return true; case 2: hasRequirements(c, pouch.getButtonId(), true, 10, pouch); return true; case 3: hasRequirements(c, pouch.getButtonId(), true, 28, pouch); return true; case 4: c.getInterfaceState().openValueInput(52700, pouch.getButtonId(), pouch.getPouchId()); return true; default: hasRequirements(c, pouch.getButtonId(), true, 1, pouch); return true; } }