mirror of
https://github.com/funkemunky/AntiVPN.git
synced 2026-05-31 17:31:55 +00:00
Fixed reloading and adding of messages into config
This commit is contained in:
@@ -115,6 +115,7 @@ public class AntiVPN {
|
||||
AntiVPN.getInstance().getMessageHandler().initStrings(vpnString -> new ConfigDefault<>
|
||||
(vpnString.getDefaultMessage(), "messages." + vpnString.getKey(), AntiVPN.getInstance())
|
||||
.get());
|
||||
AntiVPN.getInstance().getMessageHandler().reloadStrings();
|
||||
}
|
||||
|
||||
public InputStream getResource(String filename) {
|
||||
@@ -158,7 +159,8 @@ public class AntiVPN {
|
||||
|
||||
public void reloadConfig() {
|
||||
try {
|
||||
ConfigurationProvider.getProvider(YamlConfiguration.class)
|
||||
|
||||
config = ConfigurationProvider.getProvider(YamlConfiguration.class)
|
||||
.load(new File(pluginFolder.getPath() + File.separator + "config.yml"));
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
||||
Reference in New Issue
Block a user