mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-12-04 08:23:45 +01:00
feat: make the portal reload command usable from the console and rcon (#338)
This commit is contained in:
parent
5229339a8c
commit
b0a93c2c35
@ -55,6 +55,15 @@ public class AdvancedPortalsCommand implements CommandExecutor, TabCompleter {
|
|||||||
ConfigAccessor config = new ConfigAccessor(plugin, "config.yml");
|
ConfigAccessor config = new ConfigAccessor(plugin, "config.yml");
|
||||||
ConfigAccessor portalConfig = new ConfigAccessor(plugin, "portals.yml");
|
ConfigAccessor portalConfig = new ConfigAccessor(plugin, "portals.yml");
|
||||||
if (!(sender instanceof Player)) {
|
if (!(sender instanceof Player)) {
|
||||||
|
if(args.length == 1) {
|
||||||
|
if(args[0].equalsIgnoreCase("reload")) {
|
||||||
|
Listeners.reloadValues(plugin);
|
||||||
|
Portal.loadPortals();
|
||||||
|
sender.sendMessage("portal reloaded.");
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
sender.sendMessage(PluginMessages.customPrefixFail + " You cannot use commands with the console.");
|
sender.sendMessage(PluginMessages.customPrefixFail + " You cannot use commands with the console.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user