mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Fix compile issue
This commit is contained in:
parent
7615ff472d
commit
7114ff02e5
@ -40,9 +40,11 @@ public class WorldBlacklist {
|
||||
}
|
||||
|
||||
private void loadBlacklist(File blackListFile) {
|
||||
FileReader fileReader = null;
|
||||
BufferedReader bufferedReader = null;
|
||||
try {
|
||||
FileReader fileReader = new FileReader(blackListFile);
|
||||
BufferedReader bufferedReader = new BufferedReader(fileReader);
|
||||
fileReader = new FileReader(blackListFile);
|
||||
bufferedReader = new BufferedReader(fileReader);
|
||||
|
||||
String currentLine;
|
||||
|
||||
@ -54,20 +56,29 @@ public class WorldBlacklist {
|
||||
if(!blacklist.contains(currentLine))
|
||||
blacklist.add(currentLine);
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e)
|
||||
{
|
||||
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
//Close readers
|
||||
if(bufferedReader != null) bufferedReader.close();
|
||||
if(fileReader != null) fileReader.close();
|
||||
closeRead(bufferedReader);
|
||||
closeRead(fileReader);
|
||||
}
|
||||
|
||||
plugin.getLogger().info(blacklist.size()+" entries in mcMMO World Blacklist");
|
||||
}
|
||||
|
||||
private void closeRead(Reader reader) {
|
||||
if(reader != null) {
|
||||
try {
|
||||
reader.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isWorldBlacklisted(World world)
|
||||
{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user