mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-09-11 06:38:00 +02:00
update loadResource method
This commit is contained in:
parent
221b32744c
commit
24c7efbd94
@ -1,5 +1,6 @@
|
||||
package fr.xephi.authme.settings;
|
||||
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.ConsoleLogger;
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
@ -64,7 +65,7 @@ public class CustomConfiguration extends YamlConfiguration {
|
||||
int i = file.getPath().indexOf("AuthMe");
|
||||
if (i > -1) {
|
||||
String path = file.getPath().substring(i + 6).replace('\\', '/');
|
||||
InputStream is = getClass().getResourceAsStream(path);
|
||||
InputStream is = AuthMe.class.getResourceAsStream(path);
|
||||
Files.copy(is, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user