Schnittstelle EngineCommand
- Alle bekannten Implementierungsklassen:
BlockToDisplayCommand, CutsceneCommand, DialogueCommand, DumpCommand, EvalCommand, GenerateIconsCommand, HandCommand, ReloadCommand, ScreenEffectCommand, StageCommand, TestCommand, WaypointCommand
public interface EngineCommand
Util for creating commands for the /engine command.
-
Methodenübersicht
Modifikator und TypMethodeBeschreibungcom.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 voidsendFailure(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, net.minecraft.network.chat.Component message) default voidsendInfo(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String message) Sends a system/info message (standard gray).default voidsendInfo(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, net.minecraft.network.chat.Component message) default voidsendSuccess(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String message, boolean broadcastToOps) Sends a successful message with automatic color formatting.default voidsendSuccess(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, net.minecraft.network.chat.Component message, boolean broadcastToOps)
-
Methodendetails
-
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.- Löst aus:
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. -
sendSuccess
default void sendSuccess(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, net.minecraft.network.chat.Component message, boolean broadcastToOps) -
sendFailure
default void sendFailure(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String message) Sends a failure/error message. -
sendFailure
default void sendFailure(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, net.minecraft.network.chat.Component message) -
sendInfo
default void sendInfo(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String message) Sends a system/info message (standard gray). -
sendInfo
default void sendInfo(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, net.minecraft.network.chat.Component message)
-