Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01:00
use JavaPlugin.getResource() instead of JarFile.getEntry()
Dieser Commit ist enthalten in:
Ursprung
c1fe16b0e9
Commit
fbb1078569
@ -440,10 +440,10 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter
|
||||
protected void createDefaultConfiguration(String name) {
|
||||
File actual = new File(getDataFolder(), name);
|
||||
if (!actual.exists()) {
|
||||
try (JarFile file = new JarFile(getFile())) {
|
||||
ZipEntry copy = file.getEntry("defaults/" + name);
|
||||
if (copy == null) throw new FileNotFoundException();
|
||||
copyDefaultConfig(file.getInputStream(copy), actual, name);
|
||||
try {
|
||||
InputStream stream = getResource("defaults/" + name);
|
||||
if (stream == null) throw new FileNotFoundException();
|
||||
copyDefaultConfig(stream, actual, name);
|
||||
} catch (IOException e) {
|
||||
getLogger().severe("Unable to read default configuration: " + name);
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren