ICommandSender .java

net.minecraft.command.ICommandSender (interface, 61 lines): members: getCommandSenderEntity, getPositionVector, getEntityWorld, setCommandStat, getName.

net.minecraft.commandinterface61 linescommon1.7 KB

API Surface (0)

No public/protected methods detected (fields or constants only).

Code Graph: Dependencies (6)

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

Full Source

ICommandSender.java61 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.command;
2
3
import net.minecraft.entity.Entity;
4
import net.minecraft.util.BlockPos;
5
import net.minecraft.util.IChatComponent;
6
import net.minecraft.util.Vec3;
7
import net.minecraft.world.World;
8
9
public interface ICommandSender
10
{
11
    /**
12
     * Get the name of this object. For players this returns their username
13
     */
14
    String getName();
15
16
    /**
17
     * Get the formatted ChatComponent that will be used for the sender's username in chat
18
     */
19
    IChatComponent getDisplayName();
20
21
    /**
22
     * Send a chat message to the CommandSender
23
     */
24
    void addChatMessage(IChatComponent component);
25
26
    /**
27
     * Returns {@code true} if the CommandSender is allowed to execute the command, {@code false} if not
28
     */
29
    boolean canCommandSenderUseCommand(int permLevel, String commandName);
30
31
    /**
32
     * Get the position in the world. <b>{@code null} is not allowed!</b> If you are not an entity in the world, return
33
     * the coordinates 0, 0, 0
34
     */
35
    BlockPos getPosition();
36
37
    /**
38
     * Get the position vector. <b>{@code null} is not allowed!</b> If you are not an entity in the world, return 0.0D,
39
     * 0.0D, 0.0D
40
     */
41
    Vec3 getPositionVector();
42
43
    /**
44
     * Get the world, if available. <b>{@code null} is not allowed!</b> If you are not an entity in the world, return
45
     * the overworld
46
     */
47
    World getEntityWorld();
48
49
    /**
50
     * Returns the entity associated with the command sender. MAY BE NULL!
51
     */
52
    Entity getCommandSenderEntity();
53
54
    /**
55
     * Returns true if the command sender should be sent feedback about executed commands
56
     */
57
    boolean sendCommandFeedback();
58
59
    void setCommandStat(CommandResultStats.Type type, int amount);
60
}
61

Deobfuscated MCP 1.8.9 source of ICommandSender from Marcelektro/MavenMCP-1.8.9 (net/minecraft/command/ICommandSender.java), stored verbatim.