mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-13 11:04:42 +02:00
Return if createNewFile throws an exception
This commit is contained in:
@ -32,12 +32,14 @@ public class WorldBlacklist {
|
||||
blackListFile.createNewFile();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
//Load up the blacklist
|
||||
try (BufferedReader reader = new BufferedReader(new FileReader(blackListFile))) {
|
||||
String currentLine;
|
||||
while((currentLine = reader.readLine()) != null)
|
||||
if (!currentLine.isEmpty())
|
||||
blacklist.add(currentLine.toLowerCase());
|
||||
|
||||
} catch (IOException e) {
|
||||
|
Reference in New Issue
Block a user