Moved all vanilla commands into Bukkit

This commit is contained in:
Dinnerbone
2011-09-03 04:37:23 +01:00
parent 8cc03f8883
commit 0914132467
27 changed files with 1038 additions and 10 deletions

View File

@@ -0,0 +1,29 @@
package org.bukkit.command.defaults;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
public class StopCommand extends VanillaCommand {
public StopCommand() {
super("stop");
this.description = "Stops the server";
this.usageMessage = "/stop";
this.setPermission("bukkit.command.stop");
}
@Override
public boolean execute(CommandSender sender, String currentAlias, String[] args) {
if (!testPermission(sender)) return true;
Command.broadcastCommandMessage(sender, "Stopping the server..");
Bukkit.shutdown();
return true;
}
@Override
public boolean matches(String input) {
return input.startsWith("stop");
}
}