mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-02 21:41:21 +01:00
Always close files.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1481 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
0e0cfbb15b
commit
cc37bafb42
@ -337,6 +337,7 @@ public class Util
|
||||
{
|
||||
BufferedReader br = new BufferedReader(new FileReader(file));
|
||||
String version = br.readLine();
|
||||
br.close();
|
||||
if (version == null || !version.equals("#version: "+Essentials.getStatic().getDescription().getVersion())) {
|
||||
Logger.getLogger("Minecraft").log(Level.WARNING, "Translation file "+file+" is not updated for Essentials version. Will use default.");
|
||||
return cl.getResourceAsStream(string);
|
||||
|
Loading…
Reference in New Issue
Block a user