MCPcopy Create free account
hub / github.com/Bukkit/Bukkit / StopCommand

Class StopCommand

src/main/java/org/bukkit/command/defaults/StopCommand.java:7–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5import org.bukkit.command.CommandSender;
6
7public class StopCommand extends VanillaCommand {
8 public StopCommand() {
9 super("stop");
10 this.description = "Stops the server";
11 this.usageMessage = "/stop";
12 this.setPermission("bukkit.command.stop");
13 }
14
15 @Override
16 public boolean execute(CommandSender sender, String currentAlias, String[] args) {
17 if (!testPermission(sender)) return true;
18
19 Command.broadcastCommandMessage(sender, "Stopping the server..");
20 Bukkit.shutdown();
21
22 return true;
23 }
24
25 @Override
26 public boolean matches(String input) {
27 return input.startsWith("stop");
28 }
29}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected