Bit of an early christmas present for you all.
This update provides a feature some of you have been waiting for: Center support for motd
!
It also has some notable changes making it incompatible with older Paper servers.
MOTD Centering
The feature is relatively simple. Start a line with <center>
and the plugin will try to center it as good as possible using spaces.
Example:
priority: 0
motd:
- '<center><grey>This is <bold>centered</bold> Text!'
- '<aqua>And I am not!'
Result:
The text is processed before centering, meaning that placeholders will be parsed first to get the actual text-width before centering.
Important: Centering text uses specific hardcoded values and only supports a specific set of fonts. Namely:
- Max width of MOTD is set to 270.
- Spaces are set to a value of 4.
- Supported fonts are
minecraft:default
,minecraft:alt
andminecraft:uniform
Because of these factors can the centering look not quite right on specific UI scales or with specific custom fonts used by the client. Nothing I can change on my end.
plugin.yml removal
I decided to remove the plugin.yml
file from the Paper version of the Plugin.
This means that if you were using the plugin on a version that doesn't support the paper-plugin.yml
file, meaning only using the plugin.yml
, this update won't work for you anymore.
The paper-plugin.yml
was introduced (And subsequently supported by AdvancedServerList) in 1.19 builds of Paper, tho notable breaking changes regarding dependencies were introduced in later 1.19.4 builds of Paper.
To be on the safe side here will releases on Modrinth and Hangar now only list 1.20+ versions as supported.
This small update should hopefully fix an issue where a IndexOutOfBoundsException
could be raised in Conditions if only using a placeholder.
Truth be told, I'm not sure if this issue is fixed for good or not, as I wasn't really able to properly reproduce it.
But the way I understand it is this:
I had a system in place where the index (Current position in the full text) would be increased by one, if the placeholder was parsed in a condition. This had a unwanted side-effect here, where if you only used a Placeholder for the condition, it could cause the aforementioned exception. It could also happen, if the condition ended with a placeholder.
As an example, here are the indexes indicated on a condition after handling the placeholder:
# This one is fine.
${player name} != "Anonymous"
^
# This one is Out of bounds
${player isWhitelisted}
^
# This one is also Out of bounds
"Anonymous" != ${player name}
^
I really hope this issue is now fixed, as I otherwise have no idea what could be the problem.
This is a small update that only changes the MiniMOTD Migrator. It now also converts "random" being set as favicon option given the recent update of allowing random favicon to be set in AdvancedServerList.
Only other changes are some dependency bumps.
This update adds the option to set random
as the favicon option.
Doing so will make AdvancedServerList pick a random image from its favicons folder, if any are available.
This can be useful for setups, where you want a randomized MOTD and Favicon without having to make profiles
entries for every possible combination.
AdvancedServerList now caches the CompletableFuture PAPIProxyBridge gives for finding servers, rather than the actual result (which may be null).
This should hopefully help in improving compatability of the plugin without having to block threads, causing larger delays.
Due to an oversights was hover text not being sent through PAPIProxyBridge to be parsed by PlaceholderAPI. This should now be fixed.
There is no longer a warning whenever the plugin is unable to ping a server.
Other than that was there only some smaller code cleanup.