summaryrefslogtreecommitdiffstats
path: root/EssentialsUpdate/src/net/ess3/update/ModuleInfo.java
blob: e0380cf143013c6ca5b946049c0927daf94e0e22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package net.ess3.update;

import java.net.MalformedURLException;
import java.net.URL;
import org.bukkit.configuration.Configuration;


public class ModuleInfo
{
	private final String url;
	private final String version;
	private final String hash;

	public ModuleInfo(final Configuration updateConfig, final String path)
	{
		url = updateConfig.getString(path + ".url", null);
		version = updateConfig.getString(path + ".version", null);
		hash = updateConfig.getString(path + ".hash", null);
	}

	public URL getUrl() throws MalformedURLException
	{
		return new URL(url);
	}

	public String getVersion()
	{
		return version;
	}

	public String getHash()
	{
		return hash;
	}
}