CommandSource .java

net.minecraft.commands.CommandSource (interface): members: alwaysAccepts, acceptsFailure, acceptsSuccess, NULL, shouldInformAdmins, sendSystemMessage.

net.minecraft.commandsinterface39 linescommon639 B

API Surface (4)

void sendSystemMessage(final Component message)
boolean acceptsSuccess()
boolean acceptsFailure()
boolean shouldInformAdmins()

Fields & Constants (1)

NULL

Code Graph: Dependencies (1)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

CommandSource.java39 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.commands;
2
3
import net.minecraft.network.chat.Component;
4
5
public interface CommandSource {
6
	CommandSource NULL = new CommandSource() {
7
		@Override
8
		public void sendSystemMessage(final Component message) {
9
		}
10
11
		@Override
12
		public boolean acceptsSuccess() {
13
			return false;
14
		}
15
16
		@Override
17
		public boolean acceptsFailure() {
18
			return false;
19
		}
20
21
		@Override
22
		public boolean shouldInformAdmins() {
23
			return false;
24
		}
25
	};
26
27
	void sendSystemMessage(Component message);
28
29
	boolean acceptsSuccess();
30
31
	boolean acceptsFailure();
32
33
	boolean shouldInformAdmins();
34
35
	default boolean alwaysAccepts() {
36
		return false;
37
	}
38
}
39

Decompiled Minecraft 26.3 source of CommandSource (net/minecraft/commands/CommandSource.java) with Mojang official mappings, stored verbatim on the site.