This update separates the Expression system used by AdvancedServerList into its own project. You can find and use it here.
Other than that has nothing really changed.
The FaviconHandler received significant changes to improve the loading of local images, meaning the PNG files located in the plugin's favicon
folder, while also allowing to adjust the cache time for dynamic images.
Faster loading of local Favicon images
Images located in the favicons
folder are now loaded at startup of the plugin and whenever you reload it and converted into Favicon files. This allows the plugin to retrieve and use them faster without first having to go through retrieving them, converting them and then applying them (On top of all being done async so often times it's not done before the event continues).
They are not included in the cache, since they are static and don't really change unlike the URL and/or player name/UUID option may do.
Cache time option
A new config option named faviconCacheTime
is now available. It accepts a number from 1 (Which is also the default) to any positive number and sets the time in minutes for the cache to keep a Favicon stored.
This is a major release due to a breaking change, which is the removal of the deprecated conditions
option, meaning that from now on only the condition
option will be usable.
This update also brings an important bug fix just recently (like a few hours ago) found, a brand new addon to use and some improvements on error reporting for expressions.
Breaking changes
The conditions
option has been removed from server list profile files. This means any profile that still uses it won't work as expected anymore. Please make sure to switch over to the newer and much more powerful condition
option.
Bug fix
There was an oversight on my end, that caused Placeholders who return numbers to return the wrong value.
As an example, assuming a player with protocol version 756 pings the server and you use the expression ${player protocol} < 756
. The result would be true
. Why? That's because instead of taking the number a placeholder may return, the expression engine used the text-length, meaning that the expression turned into 3 < 756
.
This issue has been fixed now and placeholders should always return the right number value now when parsed. Text-based placeholder outputs still will use their text length here.
New Addon
The first official addon for AdvancedServerList has been made. It's called ASLBanPluginsAddon
and adds placeholders you can use for different ban plugins to get whether a player is banned, what the reason was, how long they stay banned, etc.
Right now does it only provide placeholders for AdvancedBan, but I'm open to support more plugins. Feel free to suggest some, or even suggest separate addons to make (Or submit your own to add to the documentation.)
Expression warning improvements
The plugin should now (hopefully) give better warnings for when an expression is invalid for some reason.
A possible error output may look like this:
[23:20:50] [Netty Worker IO Thread #2/WARN] [AdvancedServerList]: Encountered 1 issues while parsing expression '${something jadajada} < 758'
[23:20:50] [Netty Worker IO Thread #2/WARN] [AdvancedServerList]: - At Position 21: ... < 758
[23:20:50] [Netty Worker IO Thread #2/WARN] [AdvancedServerList]: Cause: Placeholder '${something jadajada}' does not have an available PlaceholderProvider.
I hope this helps in finding possible issues.
This is another breaking change to the expression system.
Namely, this one changes the ~=
operand to =~
while also adding ~
as another way for an equal ignore case check.
The reason is to make it more consistent with the ==
and =
operands and to also have it be more consistent with !=
and !~
.
This update also tries to publish to Hangar again... So if you see this on Hangar does it mean the upload worked.
This update only affects people who use the "contains" operand in their conditions.
Previously was the pattern used <-
which was taken from TAB. But a possible issue has been brought up, where a condition such as -2<-1
could be treated as -2 <- 1
when the goal was to have -2 < -1
as expression.
Because of this did I change the pattern to <_
to avoid this possible issue. So if you used <-
in your conditions, switch it over to <_
to have it working.
This release adds 3 new Operands to use, adobted from the TAB plugin:
|-
to check if the left value starts with the right value-|
to check if the left value ends with the right value<-
to check if the left value contains the right value
I also consider the plugin stable now, as I haven't been reported any issues with the expression system so far, so 3.7.0 is now here!
This update removes OkHttp as the library used for performing requests to the Modrinth API for update checks and instead uses the HTTPClient available since Java 11.
The reason for this change is an exception caused by the kotlin library - which OkHttp uses - not being relocated in ASL, causing conflicts with other plugins that may use libraries also utilizing the kotlin library.