Search in sources :

Example 1 with DependencyExpression

use of ivorius.reccomplex.utils.expression.DependencyExpression in project RecurrentComplex by Ivorforce.

the class CommandEval method execute.

@Override
public void execute(MinecraftServer server, ICommandSender commandSender, String[] args) throws CommandException {
    Parameters parameters = Parameters.of(args, expect()::declare);
    DependencyExpression matcher = parameters.get(0).rest(NaP::join).to(RCP::expression, new DependencyExpression()).require();
    boolean result = matcher.test(RecurrentComplex.saver);
    commandSender.sendMessage(RecurrentComplex.translations.get(result ? "commands.rceval.result.true" : "commands.rceval.result.false"));
}
Also used : Parameters(ivorius.mcopts.commands.parameters.Parameters) DependencyExpression(ivorius.reccomplex.utils.expression.DependencyExpression) NaP(ivorius.mcopts.commands.parameters.NaP)

Aggregations

NaP (ivorius.mcopts.commands.parameters.NaP)1 Parameters (ivorius.mcopts.commands.parameters.Parameters)1 DependencyExpression (ivorius.reccomplex.utils.expression.DependencyExpression)1