Search in sources :

Example 1 with ItemStackConverter

use of org.cubeengine.libcube.service.config.ItemStackConverter in project modules-extra by CubeEngine.

the class Backpack method onEnable.

@Listener
public void onEnable(GamePreInitializationEvent event) {
    this.modulePath = mm.getPathFor(Backpack.class);
    reflector.getCodecManager().getCodec(NBTCodec.class).getConverterManager().registerConverter(new ItemStackConverter(), ItemStack.class);
    manager = new BackpackManager(this, reflector, i18n);
    cm.getProviders().register(this, new BackpackCompleter(manager));
    cm.addCommand(new BackpackCommands(this, manager, i18n, cm));
    em.registerListener(Backpack.class, manager);
}
Also used : ItemStackConverter(org.cubeengine.libcube.service.config.ItemStackConverter) Listener(org.spongepowered.api.event.Listener)

Aggregations

ItemStackConverter (org.cubeengine.libcube.service.config.ItemStackConverter)1 Listener (org.spongepowered.api.event.Listener)1