Interface ServerPackConfigTab

  • All Implemented Interfaces:

    
    public interface ServerPackConfigTab
    
                        

    Force every server pack configuration tab to provide a certain set of methods. Said set of methods give plugins access to various configurable values, such as

    • the modpack directory

    • the list of clientside-only mods

    • the list of files and folders to include or exclude and more.

    What every accessor here reads and writes is the tab's live state — what the user currently sees — not the last saved configuration. That is the contract the individual methods rely on rather than repeating:

    • a getter reflects unsaved edits, so two calls around a user interaction can legitimately differ;

    • a setter mutates the tab exactly as typing into it would, which means SPC's own validation and status icons react to it — call validateInputFields if you need that to happen at a point of your choosing;

    • nothing here persists anything. getCurrentConfiguration builds a PackConfig from the live state on demand, and saveCurrentConfiguration is the only method that reaches disk.

    The paired getX/getXList accessors are the same data in two shapes: the string as it appears in the field, and the parsed entries. Prefer the list form for logic — the string form's delimiters are a UI detail.

    Author:

    Griefed