mirror of
https://github.com/MilkBowl/Vault.git
synced 2025-02-17 04:41:41 +01:00
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
|
||||
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
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user