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) {
|
private void loadBlacklist(File blackListFile) {
|
||||||
|
FileReader fileReader = null;
|
||||||
|
BufferedReader bufferedReader = null;
|
||||||
try {
|
try {
|
||||||
FileReader fileReader = new FileReader(blackListFile);
|
fileReader = new FileReader(blackListFile);
|
||||||
BufferedReader bufferedReader = new BufferedReader(fileReader);
|
bufferedReader = new BufferedReader(fileReader);
|
||||||
|
|
||||||
String currentLine;
|
String currentLine;
|
||||||
|
|
||||||
@ -54,20 +56,29 @@ public class WorldBlacklist {
|
|||||||
if(!blacklist.contains(currentLine))
|
if(!blacklist.contains(currentLine))
|
||||||
blacklist.add(currentLine);
|
blacklist.add(currentLine);
|
||||||
}
|
}
|
||||||
} catch (FileNotFoundException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
} catch (IOException e)
|
} catch (IOException e) {
|
||||||
{
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
//Close readers
|
//Close readers
|
||||||
if(bufferedReader != null) bufferedReader.close();
|
closeRead(bufferedReader);
|
||||||
if(fileReader != null) fileReader.close();
|
closeRead(fileReader);
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin.getLogger().info(blacklist.size()+" entries in mcMMO World Blacklist");
|
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)
|
public static boolean isWorldBlacklisted(World world)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user