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 Typ
    Methode
    Beschreibung
    com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack>
    build(net.minecraft.commands.CommandBuildContext context)
    Define the command structure here.
    default net.minecraft.server.level.ServerPlayer
    getPlayer(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 boolean
    is(net.minecraft.commands.CommandSourceStack source, int permissionLevel)
    Checks if the source has a permission based on an int level.
    default boolean
    isAdmin(net.minecraft.commands.CommandSourceStack source)
    Checks if the source is Admin.
    default boolean
    isGamemaster(net.minecraft.commands.CommandSourceStack source)
    Checks if the source is Game master.
    default boolean
    isModerator(net.minecraft.commands.CommandSourceStack source)
    Checks if the source is Moderator.
    default boolean
    isOwner(net.minecraft.commands.CommandSourceStack source)
    Checks if the source is Owner.
    default void
    sendFailure(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String message)
    Sends a failure/error message.
    default void
    sendFailure(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, net.minecraft.network.chat.Component message)
     
    default void
    sendInfo(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String message)
    Sends a system/info message (standard gray).
    default void
    sendInfo(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, net.minecraft.network.chat.Component message)
     
    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.
    default void
    sendSuccess(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)