Search in sources :

Example 1 with RepairBlockManager

use of org.cubeengine.module.itemrepair.repair.RepairBlockManager in project modules-extra by CubeEngine.

the class Itemrepair method onEnable.

@Listener
public void onEnable(GamePostInitializationEvent event) {
    Optional<EconomyService> economy = Sponge.getServiceManager().provide(EconomyService.class);
    if (!economy.isPresent()) {
        this.logger.error("Missing required EconomyService. Do you have a plugin installed that provides it?");
        this.logger.info("Listeners and Commands will not be registered.");
        return;
    }
    this.repairBlockManager = new RepairBlockManager(this, db, em, i18n, economy.get(), pm);
    em.registerListener(Itemrepair.class, new ItemRepairListener(this, i18n));
    cm.addCommand(new ItemRepairCommands(cm, this, em, i18n));
}
Also used : EconomyService(org.spongepowered.api.service.economy.EconomyService) RepairBlockManager(org.cubeengine.module.itemrepair.repair.RepairBlockManager) Listener(org.spongepowered.api.event.Listener)

Aggregations

RepairBlockManager (org.cubeengine.module.itemrepair.repair.RepairBlockManager)1 Listener (org.spongepowered.api.event.Listener)1 EconomyService (org.spongepowered.api.service.economy.EconomyService)1