Search in sources :

Example 1 with ConversionManager

use of dev.rosewood.rosestacker.manager.ConversionManager in project RoseStacker by Rosewood-Development.

the class RoseCommand method onConvert.

@Subcommand("convert")
@CommandPermission("rosestacker.convert")
@CommandCompletion("@conversionType")
public void onConvert(CommandSender sender, StackPlugin stackPlugin) {
    ConversionManager conversionManager = this.rosePlugin.getManager(ConversionManager.class);
    LocaleManager localeManager = this.rosePlugin.getManager(LocaleManager.class);
    if (conversionManager.convert(stackPlugin)) {
        localeManager.sendMessage(sender, "command-convert-converted", StringPlaceholders.single("plugin", stackPlugin.name()));
    } else {
        localeManager.sendMessage(sender, "command-convert-failed", StringPlaceholders.single("plugin", stackPlugin.name()));
    }
}
Also used : ConversionManager(dev.rosewood.rosestacker.manager.ConversionManager) LocaleManager(dev.rosewood.rosestacker.manager.LocaleManager) Subcommand(co.aikar.commands.annotation.Subcommand) CommandCompletion(co.aikar.commands.annotation.CommandCompletion) CommandPermission(co.aikar.commands.annotation.CommandPermission)

Aggregations

CommandCompletion (co.aikar.commands.annotation.CommandCompletion)1 CommandPermission (co.aikar.commands.annotation.CommandPermission)1 Subcommand (co.aikar.commands.annotation.Subcommand)1 ConversionManager (dev.rosewood.rosestacker.manager.ConversionManager)1 LocaleManager (dev.rosewood.rosestacker.manager.LocaleManager)1