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;
}
Aggregations