Add pvreload command. Resolves #32.
This commit is contained in:
@@ -26,6 +26,9 @@ import com.drtshock.playervaults.vaultmanagement.UUIDVaultManager;
|
|||||||
import com.drtshock.playervaults.vaultmanagement.VaultViewInfo;
|
import com.drtshock.playervaults.vaultmanagement.VaultViewInfo;
|
||||||
import net.milkbowl.vault.economy.Economy;
|
import net.milkbowl.vault.economy.Economy;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
@@ -115,6 +118,16 @@ public class PlayerVaults extends JavaPlugin {
|
|||||||
saveSignsFile();
|
saveSignsFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCommand(CommandSender sender, Command cmd, String label, String args[]) {
|
||||||
|
if (cmd.getName().equals("pvreload")) {
|
||||||
|
reloadConfig();
|
||||||
|
loadLang();
|
||||||
|
sender.sendMessage(ChatColor.GREEN + "Reloaded Playervaults confguration and lang files.");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
protected void checkUpdate() {
|
protected void checkUpdate() {
|
||||||
if (getConfig().getBoolean("check-update", true)) {
|
if (getConfig().getBoolean("check-update", true)) {
|
||||||
final PlayerVaults plugin = this;
|
final PlayerVaults plugin = this;
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ commands:
|
|||||||
pvconvert:
|
pvconvert:
|
||||||
description: Convert other plugins to PlayerVaults
|
description: Convert other plugins to PlayerVaults
|
||||||
aliases: [vaultconvert]
|
aliases: [vaultconvert]
|
||||||
|
pvreload:
|
||||||
|
description: Reload the config and lang files.
|
||||||
|
permission: playervaults.admin
|
||||||
permissions:
|
permissions:
|
||||||
playervaults.commands.use:
|
playervaults.commands.use:
|
||||||
description: Open own vault with command.
|
description: Open own vault with command.
|
||||||
|
|||||||
Reference in New Issue
Block a user