Search in sources :

Example 1 with TownyManager

use of com.elmakers.mine.bukkit.protection.TownyManager in project MagicPlugin by elBukkit.

the class CreatePlotAction method perform.

@Override
public SpellResult perform(CastContext context) {
    MageController apiController = context.getController();
    if (!(apiController instanceof MagicController)) {
        return SpellResult.FAIL;
    }
    MagicController controller = (MagicController) apiController;
    TownyManager towny = controller.getTowny();
    if (!towny.createPlot(context.getTargetLocation(), price)) {
        return SpellResult.NO_TARGET;
    }
    return SpellResult.CAST;
}
Also used : MageController(com.elmakers.mine.bukkit.api.magic.MageController) MagicController(com.elmakers.mine.bukkit.magic.MagicController) TownyManager(com.elmakers.mine.bukkit.protection.TownyManager)

Aggregations

MageController (com.elmakers.mine.bukkit.api.magic.MageController)1 MagicController (com.elmakers.mine.bukkit.magic.MagicController)1 TownyManager (com.elmakers.mine.bukkit.protection.TownyManager)1