Setter methods
Closed this issue · 8 comments
Can we have setter methods for
private static final String CHAT_PREFIX = "&c&lGUI &c";
private static final String NO_PREVIOUS_PAGES = "There are no previous pages.";
private static final String NO_ADDITIONAL_PAGES = "There are no additional pages.";
private static final String PREVIOUS_PAGE = "&c&lPrevious Page";
private static final String CURRENT_PAGE = "&c&lPage {currentPage} of {maxPages}";
private static final String NEXT_PAGE = "&c&lNext Page";
More than half of the issues are from me, lol.
This is something that you'd have to do yourself, just make the values equal a config setting, setup a config. Then make those methods to set and get config values
That's why I'm asking for a setter method m8.
Okay, the slight complication with this is that it wasn't designed to be used with a config. When I created it, it was meant to be a setting for developers but @LaxWasHere has raised a valid point - this should be editable by other developers.
I'm going to implement this when I restructure the API - as it currently suffers from a lot of static abuse.
As I'm sure you know, by the way, this is not a simple case of just adding setter methods because they're static final
variables - which I'm now realising was not a good idea.
This means that they cannot be changed later in the application.
@LaxWasHere Do you want them to be set per-GUI?
Yes, probably for the best just in case multiple plugins have it shaded but not relocated. Ultimately is up to you.
@LaxWasHere okay. I'll probably make global variables that can be overridden for each GUI.
The rewrite SpiGUI no longer sends these messages (instead opting to either simply remove the pagination buttons when not needed or allowing the pagination buttons to be overridden with a builder method.)