summaryrefslogtreecommitdiffstats
path: root/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateFile.java
diff options
context:
space:
mode:
authormd_5 <md_5@bigpond.com>2012-06-27 20:03:26 +1000
committermd_5 <md_5@bigpond.com>2012-06-27 20:03:26 +1000
commit7bef2d3817634a4c396e61930460126dde3606ba (patch)
treeaddbcf9b25a818a10afb9e9363ddd4ee9145b490 /EssentialsUpdate/src/com/earth2me/essentials/update/UpdateFile.java
parent3d96c9caaf19cc1e6849295067d2a3ac01f05351 (diff)
downloadEssentials-7bef2d3817634a4c396e61930460126dde3606ba.tar
Essentials-7bef2d3817634a4c396e61930460126dde3606ba.tar.gz
Essentials-7bef2d3817634a4c396e61930460126dde3606ba.tar.lz
Essentials-7bef2d3817634a4c396e61930460126dde3606ba.tar.xz
Essentials-7bef2d3817634a4c396e61930460126dde3606ba.zip
Cleanup signs, update and xmpp, more to come.
Diffstat (limited to 'EssentialsUpdate/src/com/earth2me/essentials/update/UpdateFile.java')
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/UpdateFile.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateFile.java b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateFile.java
index 3d465e2e8..0659f7dbb 100644
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateFile.java
+++ b/EssentialsUpdate/src/com/earth2me/essentials/update/UpdateFile.java
@@ -3,6 +3,7 @@ package com.earth2me.essentials.update;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.math.BigInteger;
import java.security.KeyFactory;
@@ -15,6 +16,7 @@ import java.util.TreeMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Bukkit;
+import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.Plugin;
@@ -25,7 +27,6 @@ public class UpdateFile
private final static String UPDATE_URL = "http://goo.gl/67jev";
private final static BigInteger PUBLIC_KEY = new BigInteger("5ha6a2d4qdy17ttkg8evh74sl5a87djojwenu12k1lvy8ui6003e6l06rntczpoh99mhc3txj8mqlxw111oyy9yl7s7qpyluyzix3j1odxrxx4u52gxvyu6qiteapczkzvi7rxgeqsozz7b19rdx73a7quo9ybwpz1cr82r7x5k0pg2a73pjjsv2j1awr13azo7klrcxp9y5xxwf5qv1s3tw4zqftli18u0ek5qkbzfbgk1v5n2f11pkwwk6p0mibrn26wnjbv11vyiqgu95o7busmt6vf5q7grpcenl637w83mbin56s3asj1131b2mscj9xep3cbj7la9tgsxl5bj87vzy8sk2d34kzwqdqgh9nry43nqqus12l1stmiv184r8r3jcy8w43e8h1u1mzklldb5eytkuhayqik8l3ns04hwt8sgacvw534be8sx26qrn5s1", 36);
private final transient File file;
- private transient YamlConfiguration updateConfig;
private final transient Plugin plugin;
private final transient TreeMap<Version, VersionInfo> versions = new TreeMap<Version, VersionInfo>();
@@ -185,16 +186,14 @@ public class UpdateFile
return false;
}
- private void readVersions() throws Exception
+ private void readVersions() throws FileNotFoundException, InvalidConfigurationException, IOException
{
- updateConfig = new YamlConfiguration();
+ final YamlConfiguration updateConfig = new YamlConfiguration();
updateConfig.load(file);
versions.clear();
for (String versionString : updateConfig.getKeys(false))
{
- final Version version = new Version(versionString);
- final VersionInfo info = new VersionInfo(updateConfig, versionString);
- versions.put(version, info);
+ versions.put(new Version(versionString), new VersionInfo(updateConfig, versionString));
}
}