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