All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.nukkit.command.data.GenericParameter Maven / Gradle / Ivy

There is a newer version: 1.20.40-r1
Show newest version
package cn.nukkit.command.data;

import cn.nukkit.api.PowerNukkitXOnly;
import cn.nukkit.api.Since;
import cn.nukkit.command.tree.node.ChainedCommandNode;
import cn.nukkit.command.tree.node.ItemNode;

@PowerNukkitXOnly
@Since("1.19.60-r1")
public interface GenericParameter {
    CommandParameterSupplier OBJECTIVES = (optional) -> CommandParameter.newEnum("objective", optional, CommandEnum.SCOREBOARD_OBJECTIVES);
    CommandParameterSupplier TARGET_OBJECTIVES = (optional) -> CommandParameter.newEnum("targetObjective", optional, CommandEnum.SCOREBOARD_OBJECTIVES);
    CommandParameterSupplier ITEM_NAME = (optional) -> CommandParameter.newEnum("itemName", optional, CommandEnum.ENUM_ITEM, new ItemNode());
    CommandParameterSupplier CHAINED_COMMAND = (optional) -> CommandParameter.newEnum("chainedCommand", optional, CommandEnum.CHAINED_COMMAND_ENUM, new ChainedCommandNode(), CommandParamOption.ENUM_AS_CHAINED_COMMAND);
    CommandParameterSupplier ORIGIN = (optional) -> CommandParameter.newType("origin", optional, CommandParamType.TARGET);

    @FunctionalInterface
    interface CommandParameterSupplier {
        T get(boolean optional);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy