Class ExpandCommandSource

java.lang.Object
com.blamejared.crafttweaker.natives.command.ExpandCommandSource

@ZenRegister public class ExpandCommandSource extends Object
Represents a source of a command execution, such as an Entity or the MinecraftServer.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    acceptsFailure(net.minecraft.commands.CommandSource internal)
    Checks if the commands from this source should return failure messages
    static boolean
    acceptsSuccess(net.minecraft.commands.CommandSource internal)
    Checks if the commands from this source should return successful messages
    static boolean
    alwaysAccepts(net.minecraft.commands.CommandSource internal)
    Checks if the command source always accepts.
    static void
    sendMessage(net.minecraft.commands.CommandSource internal, net.minecraft.network.chat.Component component)
    Sends a message to the command source.
    static boolean
    shouldInformAdmins(net.minecraft.commands.CommandSource internal)
    Checks if the commands from this source should inform admins.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExpandCommandSource

      public ExpandCommandSource()
  • Method Details

    • sendMessage

      public static void sendMessage(net.minecraft.commands.CommandSource internal, net.minecraft.network.chat.Component component)
      Sends a message to the command source.
      Parameters:
      component - The message to send.
    • acceptsSuccess

      public static boolean acceptsSuccess(net.minecraft.commands.CommandSource internal)
      Checks if the commands from this source should return successful messages
      Returns:
      True if the commands from this source should return successful messages, false otherwise.
    • acceptsFailure

      public static boolean acceptsFailure(net.minecraft.commands.CommandSource internal)
      Checks if the commands from this source should return failure messages
      Returns:
      True if the commands from this source should return failure messages, false otherwise.
    • shouldInformAdmins

      public static boolean shouldInformAdmins(net.minecraft.commands.CommandSource internal)
      Checks if the commands from this source should inform admins.
      Returns:
      True if the commands from this source should inform admins, false otherwise.
    • alwaysAccepts

      public static boolean alwaysAccepts(net.minecraft.commands.CommandSource internal)
      Checks if the command source always accepts.
      Returns:
      True if the command source always accepts, false otherwise.