Solved Reload Config With a Command?

Discussion in 'Plugin Development' started by xxCoderForLifexx, Jan 27, 2013.

Thread Status:
Not open for further replies.
  1. How would I reload the config with a command?
    Like
    Code:
    /cats reload
     
  2. Offline

    RealDope

    Code:JAVA
    1.  
    2. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    3. if(cmd.getName().equalsIgnoreCase("cats") {
    4. if(args.length == 1) {
    5. if(args[0].equalsIgnoreCase("reload") {
    6. if(sender.hasPermission("cats.reload") {
    7. reloadConfig();
    8. }
    9. }
    10. }
    11. }
    12. }
    13.  


    Must say, surprised you don't know something so simple with 17 bukkit dev plugins?
     
  3. Thanks :D
     
Thread Status:
Not open for further replies.

Share This Page