As promised last time is here a proper release of v5.6.0
which I call the "Favicon Overhaul".
This update provides significant changes to the FaviconHandler, providing a new feature in the form of Favicon merging and also a config.yml option to set how ASL should handle images with sizes that aren't exactly 64x64 pixels.
FaviconHandler improvements
The FaviconHandler has received major improvements. First of all are PlaceholderAPI placeholders now supported.
Additionally was the async handling of Favicon creation simplified, as it was overcomplicated before.
Favicon merging
A new feature was added called favicon merging.
With this feature are you able to combine multiple sources into a single favicon, allowing more complex, dynamic favicons to be created.
To merge favicons, add new entries to the String separated by semicolons. As an example ${player uuid};border.png
would first place the Player head followed by putting border.png
over it. The result would be similar to this:
Favicon resizing
A new option called faviconStrategy
was added to the config.yml
. This option allows you to set how ASL should handle Images that have a size that isn't 64x64
pixels.
The default option is resize
but can be changed to center
and none
:
center
does not resize the image, but instead centers it as good as possible in the Favicon.none
does not resize the image, nor move it. The image will simply placed at 0,0, which is the top-left corner of the Favicon.
With these features should you be able to create some really cool Favicons for your server.
This update adds a faviconStrategy: <string>
option to the config.yml
This option allows you to change how AdvancedServerList should handle images for a favicon, that do not have a size of 64x64 pixels.
The following Options are available:
resize
(Default): Resizes the image to fit the 64x64 pixels area.center
: Doesn't resize the image, but instead centers it as good as possible.none
: Doesn't resize nor center the image. It simply puts it at 0,0 (top-left corner of the favicon) unchanged.
Note that the favicon itself is always 64x64, even if the images depicted in it are smaller. This is simply due to Minecraft requiring such a size.
This option should allow some creative aproaches with Favicons, especially when combined with the favicon merging published in the previous beta.
Should there be no reports of bugs or similar do I plan to publish a proper release during the next week.
This Beta brings support for PlaceholderAPI placeholders in the Favicon and a new feature of Favicon merging!
PlaceholderAPI support in favicon
For whatever reason did the plugin not support placeholders from PlaceholderAPI in the favicon option. This has been changed now.
Favicon merging
The Favicon option now allows you to merge multiple values into a single Favicon to display.
To use this option, separate each part with a semicolon. Each part supports the same options as a normal favicon, meaning you can use URLs, a placeholder that turns into a player name/UUID or an image name maching one in the favicons folder.
As an example, setting ${player uuid};border.png
can return a favicon like this:
This should allow you to create more unique Favicons to display to players.
Keep in mind, that each part follows the same rules as a normal favicon, meaning that images not having a size of 64x64 pixels will be resized accordingly.
Also, the creation of such a Favicon is done asynchronously, similar to Favicons from a URL/placeholder. As such can it take a while for a Favicon to be displayed and may require more than one ping of the server.
Please let me know about any issues you may encounter with this feature.
Fixes a NoClassDefFoundError you encounter on Paper. This was due to the fact that the cloud-paper dependency wasn't shaded into the jar itself.
This update brings three significant changes: The addition of new operands for the condition option, the move to cloud for command handling and some new commands.
Please note that I tried my best in testing these changes, but given I do not have an actual server can there be bugs and issues. Please report them to me if you encounter them!
Also, do note that the plugin now compiles against Java 21. But given there being no stats listing Java 16 should this not be an issue here. If it is for you, update your Java version please.
New operands
There are three new operands that can be used within your conditions:
|~
Starts with (Ignoring case)~|
Ends with (Ignoring case)<~
Contains (Ignoring case)
Move to cloud command framework
The plugin is now shading in and using the Cloud command framework by incendo, to have some better overall handling of commands, including improved tab completion.
The /asl help
command has also been changed. It now uses the MinecraftHelp
class from cloud to display a list of all available commands with hover and click actions. It also allows you to provide a query to search for specific commands (Has suggestions and tab completion available).
New commands
New commands have been added to further improve the handling of profiles in the plugin:
/asl profiles info <profile>
This command provides you with information regarding the selected profile. The returned tree will be a representation of the profile's options, including whether they are set or not and what value they may have. Additionally do most of these options have click actions to receive a matching /asl profiles set
command to set or reset the value accordingly.
/asl profiles set <profile> <option> [value]
This command allows you to update an option's value. What values you can set depends on the provided option (i.e. priority
only allows whole number values).
The options motd
and playercount.hover
allow you to set multiple lines by using either \n
or <newline>
in the text.
Finally can you also leave [value]
blank to reset the option to its default value, which usually is an empty String or List.
Note that the returned success response has a hover for the mentioned option that shows the old and new values you have set.
This is just a small fix to add hidePlayersHover
to the ignoreMaintenance
option in the config.yml alongside adding the option to the default.yml file.
As usual should the plugin make a backup and migrate the config.yml on its own.