mirror of https://github.com/MilkBowl/Vault.git
Rename commands to 'vault-info' and 'vault-reload' to allow others to use 'vault' for other purposes.
This commit is contained in:
parent
389f5c3b6b
commit
29483e928e
12
plugin.yml
12
plugin.yml
|
@ -1,11 +1,15 @@
|
||||||
name: Vault
|
name: Vault
|
||||||
main: net.milkbowl.vault.Vault
|
main: net.milkbowl.vault.Vault
|
||||||
version: 1.0.0dev
|
version: 1.0.0dev1
|
||||||
author: Cereal
|
author: Cereal
|
||||||
description: >
|
description: >
|
||||||
Abstraction Library for Bukkit Plugins
|
Abstraction Library for Bukkit Plugins
|
||||||
commands:
|
commands:
|
||||||
vault:
|
vault-info:
|
||||||
description: Generic command for Vault API
|
description: Displays information about Vault
|
||||||
usage: |
|
usage: |
|
||||||
/<command> - displays vault command help
|
/<command> - Displays Vault information
|
||||||
|
vault-reload:
|
||||||
|
description: Reloads Vault
|
||||||
|
usage: |
|
||||||
|
/<command> - Reloads Vault
|
|
@ -64,7 +64,8 @@ public class Vault extends JavaPlugin {
|
||||||
loadEconomy();
|
loadEconomy();
|
||||||
loadPermission();
|
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()));
|
log.info(String.format("[%s] Enabled Version %s", getDescription().getName(), getDescription().getVersion()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,19 +205,15 @@ public class Vault extends JavaPlugin {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(command.getLabel().equals("vault")) {
|
if (command.getLabel().equals("vault-info")) {
|
||||||
if(args.length > 0) {
|
sender.sendMessage(String.format("[%s] Vault v%s Information", getDescription().getName(), getDescription().getVersion()));
|
||||||
if(args[0].equalsIgnoreCase("info")) {
|
sender.sendMessage(String.format("[%s] Economy: %s", getDescription().getName(), getEconomy().getName()));
|
||||||
sender.sendMessage(String.format("[%s] Vault v%s Information", getDescription().getName(), getDescription().getVersion()));
|
sender.sendMessage(String.format("[%s] Permission: %s", getDescription().getName(), getPermission().getName()));
|
||||||
sender.sendMessage(String.format("[%s] Economy: %s", getDescription().getName(), getEconomy().getName()));
|
return true;
|
||||||
sender.sendMessage(String.format("[%s] Permission: %s", getDescription().getName(), getPermission().getName()));
|
} else if (command.getLabel().equals("vault-reload")) {
|
||||||
return true;
|
reload();
|
||||||
} else if(args[0].equalsIgnoreCase("reload")) {
|
sender.sendMessage(String.format("[%s] Reloaded Addons", getDescription().getName()));
|
||||||
reload();
|
return true;
|
||||||
sender.sendMessage(String.format("[%s] Reloaded Addons", getDescription().getName()));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show help
|
// Show help
|
||||||
|
|
Loading…
Reference in New Issue