CommandStop .java

net.minecraft.command.server.CommandStop (class): members: getCommandUsage, getCommandName, processCommand. strings: "commands.stop.start", "stop".

net.minecraft.command.serverclass39 linesserverextends CommandBase946 B

API Surface (3)

String getCommandName()
String getCommandUsage(ICommandSender sender)
void processCommand(ICommandSender sender, String[] args)

String literals (3)

"stop"
"commands.stop.usage"
"commands.stop.start"

Code Graph: Dependencies (4)

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

Full Source

CommandStop.java39 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.command.server;
2
3
import net.minecraft.command.CommandBase;
4
import net.minecraft.command.CommandException;
5
import net.minecraft.command.ICommandSender;
6
import net.minecraft.server.MinecraftServer;
7
8
public class CommandStop extends CommandBase
9
{
10
    /**
11
     * Gets the name of the command
12
     */
13
    public String getCommandName()
14
    {
15
        return "stop";
16
    }
17
18
    /**
19
     * Gets the usage string for the command.
20
     */
21
    public String getCommandUsage(ICommandSender sender)
22
    {
23
        return "commands.stop.usage";
24
    }
25
26
    /**
27
     * Callback when the command is invoked
28
     */
29
    public void processCommand(ICommandSender sender, String[] args) throws CommandException
30
    {
31
        if (MinecraftServer.getServer().worldServers != null)
32
        {
33
            notifyOperators(sender, this, "commands.stop.start", new Object[0]);
34
        }
35
36
        MinecraftServer.getServer().initiateShutdown();
37
    }
38
}
39

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