Interface EngineCommand
- All Known Implementing Classes:
CutsceneCommand, DumpCommand, EvalCommand, GenerateIconsCommand, HandCommand, ReloadCommand, ScreenEffectCommand, StageCommand, TestCommand, WaypointCommand
public interface EngineCommand
Util for creating commands for the /engine command.
-
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> build(net.minecraft.commands.CommandBuildContext context) Define the command structure here.default net.minecraft.server.level.ServerPlayergetPlayer(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) Quickly gets the player from the context or throws the standard 'Player Only' exception.default booleanis(net.minecraft.commands.CommandSourceStack source, int permissionLevel) Checks if the source has a permission based on an int level.default booleanisAdmin(net.minecraft.commands.CommandSourceStack source) Checks if the source is Admin.default booleanisGamemaster(net.minecraft.commands.CommandSourceStack source) Checks if the source is Game master.default booleanisModerator(net.minecraft.commands.CommandSourceStack source) Checks if the source is Moderator.default booleanisOwner(net.minecraft.commands.CommandSourceStack source) Checks if the source is Owner.default voidsendFailure(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String message) Sends a failure/error message.default voidsendInfo(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String message) Sends a system/info message (standard gray).default voidsendSuccess(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String message, boolean broadcastToOps) Sends a successful message with automatic color formatting.
-
Method Details
-
build
com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> build(net.minecraft.commands.CommandBuildContext context) Define the command structure here. -
isModerator
default boolean isModerator(net.minecraft.commands.CommandSourceStack source) Checks if the source is Moderator. -
isGamemaster
default boolean isGamemaster(net.minecraft.commands.CommandSourceStack source) Checks if the source is Game master. -
isAdmin
default boolean isAdmin(net.minecraft.commands.CommandSourceStack source) Checks if the source is Admin. -
isOwner
default boolean isOwner(net.minecraft.commands.CommandSourceStack source) Checks if the source is Owner. -
is
default boolean is(net.minecraft.commands.CommandSourceStack source, int permissionLevel) Checks if the source has a permission based on an int level. -
getPlayer
default net.minecraft.server.level.ServerPlayer getPlayer(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) throws com.mojang.brigadier.exceptions.CommandSyntaxException Quickly gets the player from the context or throws the standard 'Player Only' exception.- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
sendSuccess
default void sendSuccess(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String message, boolean broadcastToOps) Sends a successful message with automatic color formatting. -
sendFailure
default void sendFailure(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String message) Sends a failure/error message. -
sendInfo
default void sendInfo(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String message) Sends a system/info message (standard gray).
-