Closed a possible resource leak, updated README.md to point to DBO instead of Github's deprecated downloads section

This commit is contained in:
Steven Smith 2012-12-28 04:54:13 +08:00
parent 31faf605dc
commit d9ca9c62cb
3 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ Usage
Installing Installing
---------- ----------
1. Download the latest release: [https://github.com/MassiveCraft/Factions/downloads](https://github.com/MassiveCraft/Factions/downloads)<br> 1. Download the latest release: [http://dev.bukkit.org/server-mods/factions/](http://dev.bukkit.org/server-mods/factions/)<br>
1. Put Factions.jar in the plugins folder. 1. Put Factions.jar in the plugins folder.
A default config file will be created on the first run. A default config file will be created on the first run.

View File

@ -115,7 +115,6 @@ public class EssentialsFeatures
private static class LocalChatListener implements Listener private static class LocalChatListener implements Listener
{ {
@SuppressWarnings("unused")
@EventHandler(priority = EventPriority.NORMAL) @EventHandler(priority = EventPriority.NORMAL)
public void onPlayerChat(EssentialsLocalChatEvent event) public void onPlayerChat(EssentialsLocalChatEvent event)
{ {

View File

@ -94,6 +94,7 @@ public class DiscUtil
ReadableByteChannel rbc = Channels.newChannel(url.openStream()); ReadableByteChannel rbc = Channels.newChannel(url.openStream());
FileOutputStream fos = new FileOutputStream(file); FileOutputStream fos = new FileOutputStream(file);
fos.getChannel().transferFrom(rbc, 0, 1 << 24); fos.getChannel().transferFrom(rbc, 0, 1 << 24);
fos.close();
return true; return true;
} }
catch (Exception e) catch (Exception e)