cn.nukkit.command.data.GenericParameter Maven / Gradle / Ivy
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);
}
}