001 package org.bukkit.command.defaults; 002 003 import java.util.Arrays; 004 005 import org.bukkit.Bukkit; 006 import org.bukkit.ChatColor; 007 import org.bukkit.command.Command; 008 import org.bukkit.command.CommandSender; 009 010 public class ReloadCommand extends BukkitCommand { 011 public ReloadCommand(String name) { 012 super(name); 013 this.description = "Reloads the server configuration and plugins"; 014 this.usageMessage = "/reload"; 015 this.setPermission("bukkit.command.reload"); 016 this.setAliases(Arrays.asList("rl")); 017 } 018 019 @Override 020 public boolean execute(CommandSender sender, String currentAlias, String[] args) { 021 if (!testPermission(sender)) return true; 022 023 Bukkit.reload(); 024 Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Reload complete."); 025 026 return true; 027 } 028 }