mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 06:06:45 +01:00
Return if createNewFile throws an exception
This commit is contained in:
parent
3b343b9a7f
commit
577ec718f1
@ -32,13 +32,15 @@ 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)
|
||||
blacklist.add(currentLine.toLowerCase());
|
||||
if (!currentLine.isEmpty())
|
||||
blacklist.add(currentLine.toLowerCase());
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
Loading…
Reference in New Issue
Block a user