Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Spigot based APIs and Utilities for Configs, GUIs, Languages, Custom Items and more.

License

Notifications You must be signed in to change notification settings

Minehut/WolfyUtilities

 
 

Repository files navigation

WolfyUtilities Banner

WolfyUtilities

bstats_server spigot_down spigot_stars github_commit lines_code

This API is the core that powers all of my plugins like CustomCrafting, ArmorStandTool, and possible future ones.

WolfyUtilities contains a lot of useful APIs, such as:

  • InventoryAPI to create and manage in-game GUIs.
  • ConfigAPI to easily manage YAML and JSON configs.
  • LanguageAPI to load languages and support multiple languages for GUIs, messages, etc.!
  • ChatAPI to send translatable messages, make clickable text execute code, and more.
  • NMS API including a fully featured NBTTag API, custom RecipeIterator, and some block and Inventory Utils.
  • CustomItems allow creating custom items with special settings.

and Utils:

  • Serialize/Deserialize ItemStacks via Base64.
  • Basic Reflection Utils.
  • Player Head utils to set textures and more.
  • Basic MySQL connection to run queries and updates.
  • ItemBuilder to edit/create ItemStacks.
  • Save player specific data.

The API is build with customization in mind, so that you can register a lot of your own settings, data, CustomItems into the Registry and share it across plugins.
It constantly receives updates to improve, fix issues, and make it as easy as possible to use.

Getting started

You can get the API from the public maven repo:

<repositories>
    <repository>
        <id>wolfyscript-public</id>
        <url>https://maven.wolfyscript.com/repository/public/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>com.wolfyscript.wolfyutilities</groupId>
        <artifactId>wolfyutilities</artifactId>
        <version>1.6.3.22</version>
    </dependency>
</dependencies>

To start using it you need to create an API instance for your plugin.
It's best to initiate it in your constructor, so you don't mistakenly change the instance of the api. (And we are able to use some options of the API onLoad())

import me.wolfyscript.utilities.api.WolfyUtilities;
import me.wolfyscript.utilities.api.chat.Chat;

public class YourPlugin extends JavaPlugin {
    
    private final WolfyUtilities api;

    public YourPlugin() {
        super();
        //Create the instance for your plugin. We don't want to initialize the events yet (so set it to false)!
        api = WolfyUtilities.get(this, false);
        this.chat = api.getChat();
        //We should set our prefixes for the chat and console.
        this.chat.setInGamePrefix("§7[§3CC§7] ");
        this.chat.setConsolePrefix("§7[§3CC§7] ");
        
        //Optionally you can set a custom cache object to save custom data for your GUI. (More detail soon)
        api.setInventoryAPI(new InventoryAPI<>(api.getPlugin(), api, CCCache.class));
    }

    @Override
    public void onEnable() {
        //Once the plugin is enabled we can initialize the events!
        this.api.initialize();
    }
    
}

More info about the API can be found in the Wiki.

About

Spigot based APIs and Utilities for Configs, GUIs, Languages, Custom Items and more.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%