Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
ReloadCommand.java
1 package org.bukkit.command.defaults;
2 
3 import java.util.Arrays;
4 
5 import org.bukkit.Bukkit;
6 import org.bukkit.ChatColor;
9 
10 public class ReloadCommand extends BukkitCommand {
11  public ReloadCommand(String name) {
12  super(name);
13  this.description = "Reloads the server configuration and plugins";
14  this.usageMessage = "/reload";
15  this.setPermission("bukkit.command.reload");
16  this.setAliases(Arrays.asList("rl"));
17  }
18 
19  @Override
20  public boolean execute(CommandSender sender, String currentAlias, String[] args) {
21  if (!testPermission(sender)) return true;
22 
23  Bukkit.reload();
24  Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Reload complete.");
25 
26  return true;
27  }
28 }
boolean testPermission(CommandSender target)
Command setAliases(List< String > aliases)
void setPermission(String permission)
static void reload()
Definition: Bukkit.java:287