Class ExpandCommandSource
java.lang.Object
com.blamejared.crafttweaker.natives.command.ExpandCommandSource
Represents a source of a command execution, such as an
Entity or the MinecraftServer.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanacceptsFailure(net.minecraft.commands.CommandSource internal) Checks if the commands from this source should return failure messagesstatic booleanacceptsSuccess(net.minecraft.commands.CommandSource internal) Checks if the commands from this source should return successful messagesstatic booleanalwaysAccepts(net.minecraft.commands.CommandSource internal) Checks if the command source always accepts.static voidsendMessage(net.minecraft.commands.CommandSource internal, net.minecraft.network.chat.Component component) Sends a message to the command source.static booleanshouldInformAdmins(net.minecraft.commands.CommandSource internal) Checks if the commands from this source should inform admins.
-
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.
-