WolfyUtilities 3.16

Details

  • Filename
    wolfyutilities-3.16.0.0.jar
  • Uploaded by
  • Uploaded
    Jan 3, 2022
  • Size
    3.87 MB
  • Downloads
    4,356
  • MD5
    8d74420c8ae3632b767715bab6466661

Supported Bukkit Versions

  • 1.18.1
  • 1.18
  • 1.17
  • 1.16

Changelog

Revert library changes & Updatable GUI titles

Due to lots of issues regarding the previous library changes, this updates reverts those changes.
The Jackson library is again shaded and relocated. The usage of the libraries feature in the plugin.yml was removed.

That will prevent conflicts with other plugins that are not using their libraries correctly and resolves the 1.16 incompatibility.

 

Updatable GUI Titles & PlaceholderAPI support

GuiWindows can now update their titles without being reopened or language reload.
For that, there are a few new methods:

  • onUpdateTitle(String originalTitle, @Nullable GUIInventory<C> inventory, GuiHandler<C> guiHandler) - Called each title update.
  • setTitleUpdateDelay(int titleUpdateDelay) - Set the initial delay after the inventory was opened.
  • setTitleUpdatePeriod(int titleUpdatePeriod) - Set the delay of each title update.

Using these methods, you can change the title dependent on your data. You can also set a repeating task that updates the title each specified period.

Additionally, the titles support PlaceholderAPI now. Placeholders and BracketPlaceholders will be replaced if the PlaceholderAPI plugin is available.
For that, there is a new PluginIntegration called PlaceholderAPIIntegration that allows you to call PlaceholderAPI methods without hooking into it on your own.

PlaceholderAPIIntegration integration = wuCore.getCompatibilityManager().getPlugins().getIntegration("PlaceholderAPI", PlaceholderAPIIntegration.class);
if (integration != null) {
    //PlaceholderAPI is available
    //use the integration e.g. integration.setPlaceholders(player, yourString);
}

or via the functional usage

wuCore.getCompatibilityManager().getPlugins().runIfAvailable("PlaceholderAPI", PlaceholderAPIIntegration.class, integration -> {
    //PlaceholderAPI is available
    //use the integration e.g. integration.setPlaceholders(player, yourString); 
    //of course you need to use Atomics to edit variables outside of this lambda.
});


More info on GitHub