/HoloItems

An attempt to rewrite HoloItems

Primary LanguageJavaGNU General Public License v3.0GPL-3.0

HoloItems

A plugin that adds some custom items themed around hololive talents!

Contributing

This plugin uses HoloItemsAPI to register and listen to custom items. To learn more about the API, click here.

Adding an item

To create a new custom item, create a class that extends the CustomItem class. The internal name of the item should have no spaces. The internal ID of the item will be used as the custom model data. Anything else you can add/set (enchantments, cooldowns, etc.) can be found in the CustomItem class. Make sure to register the item at its constructor.

    private static final String name = "tide_rider";
    private static final Material material = Material.TRIDENT;
    private static final String displayName = ChatColor.BLUE + "Tide Rider";
    private static final List<String> lore = List.of(
        "Surf the waves"
    );

    public TideRider() {
        super(name, material, displayName, lore);
        this.setStackable(false);
        this.register();
    }

When making custom items that are enchantable, make sure to create the custom enchantment as well, and apply said custom enchantment on the buildStack method.

Once the class is created, add an instance of the class to the idol's constructor in the CollectionManager class, like so:

    var gura = new GawrGura(
        new TideRider()
    );

If you want to have an item that consists of a large runnable task, you should create a class that extends ItemAbility. More info about it here. Put the class in the same package as the item class.

Building and testing

This project is configured to be packaged by Gradle wrapper. The Gradle wrapper script is invoked by running ./gradlew.bat [task] on Windows or ./gradlew [task] on Linux!

The main tasks to use are clean, build, and runServer!