Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01:00
use try-with-resources
Dieser Commit ist enthalten in:
Ursprung
bd692917e6
Commit
39e1026400
@ -439,9 +439,10 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter
|
||||
File actual = new File(getDataFolder(), name);
|
||||
if (!actual.exists()) {
|
||||
try {
|
||||
InputStream stream = getResource("defaults/" + name);
|
||||
if (stream == null) throw new FileNotFoundException();
|
||||
copyDefaultConfig(stream, 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