Rename commands to 'vault-info' and 'vault-reload' to allow others to use 'vault' for other purposes.

This commit is contained in:
Morgan 2011-07-18 12:34:54 -04:00
parent 389f5c3b6b
commit 29483e928e
2 changed files with 19 additions and 18 deletions

View File

@ -1,11 +1,15 @@
name: Vault
main: net.milkbowl.vault.Vault
version: 1.0.0dev
version: 1.0.0dev1
author: Cereal
description: >
Abstraction Library for Bukkit Plugins
commands:
vault:
description: Generic command for Vault API
vault-info:
description: Displays information about Vault
usage: |
/<command> - displays vault command help
/<command> - Displays Vault information
vault-reload:
description: Reloads Vault
usage: |
/<command> - Reloads Vault

View File

@ -64,7 +64,8 @@ public class Vault extends JavaPlugin {
loadEconomy();
loadPermission();
getCommand("vault").setExecutor(this);
getCommand("vault-info").setExecutor(this);
getCommand("vault-reload").setExecutor(this);
log.info(String.format("[%s] Enabled Version %s", getDescription().getName(), getDescription().getVersion()));
}
@ -204,19 +205,15 @@ public class Vault extends JavaPlugin {
return true;
}
if(command.getLabel().equals("vault")) {
if(args.length > 0) {
if(args[0].equalsIgnoreCase("info")) {
sender.sendMessage(String.format("[%s] Vault v%s Information", getDescription().getName(), getDescription().getVersion()));
sender.sendMessage(String.format("[%s] Economy: %s", getDescription().getName(), getEconomy().getName()));
sender.sendMessage(String.format("[%s] Permission: %s", getDescription().getName(), getPermission().getName()));
return true;
} else if(args[0].equalsIgnoreCase("reload")) {
reload();
sender.sendMessage(String.format("[%s] Reloaded Addons", getDescription().getName()));
return true;
}
}
if (command.getLabel().equals("vault-info")) {
sender.sendMessage(String.format("[%s] Vault v%s Information", getDescription().getName(), getDescription().getVersion()));
sender.sendMessage(String.format("[%s] Economy: %s", getDescription().getName(), getEconomy().getName()));
sender.sendMessage(String.format("[%s] Permission: %s", getDescription().getName(), getPermission().getName()));
return true;
} else if (command.getLabel().equals("vault-reload")) {
reload();
sender.sendMessage(String.format("[%s] Reloaded Addons", getDescription().getName()));
return true;
}
// Show help