diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-04-01 16:04:43 +0100 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-04-01 16:09:23 +0100 |
commit | 61b8c36233604fbf20f1c892a24eab64b9677951 (patch) | |
tree | b1fe9d9caa409793372e2b5e21da2dd7550a923b /src/main/java/org/bukkit/plugin/PluginDescriptionFile.java | |
parent | a6b67158dc49c71f46bd2da9b83254fd44655f14 (diff) | |
download | bukkit-61b8c36233604fbf20f1c892a24eab64b9677951.tar bukkit-61b8c36233604fbf20f1c892a24eab64b9677951.tar.gz bukkit-61b8c36233604fbf20f1c892a24eab64b9677951.tar.lz bukkit-61b8c36233604fbf20f1c892a24eab64b9677951.tar.xz bukkit-61b8c36233604fbf20f1c892a24eab64b9677951.zip |
Implemented ebeans
Diffstat (limited to 'src/main/java/org/bukkit/plugin/PluginDescriptionFile.java')
-rw-r--r-- | src/main/java/org/bukkit/plugin/PluginDescriptionFile.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java index 6f6d5c4a..cc6d893c 100644 --- a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java +++ b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java @@ -23,6 +23,7 @@ public final class PluginDescriptionFile { private String description = null; private ArrayList<String> authors = new ArrayList<String>(); private String website = null; + private boolean database = false; @SuppressWarnings("unchecked") public PluginDescriptionFile(final InputStream stream) throws InvalidDescriptionException { @@ -120,6 +121,14 @@ public final class PluginDescriptionFile { return website; } + public boolean isDatabaseEnabled() { + return database; + } + + public void setDatabaseEnabled(boolean database) { + this.database = database; + } + private void loadMap(Map<String, Object> map) throws InvalidDescriptionException { try { name = map.get("name").toString(); @@ -164,6 +173,14 @@ public final class PluginDescriptionFile { } } + if (map.containsKey("database")) { + try { + database = (Boolean)map.get("database"); + } catch (ClassCastException ex) { + throw new InvalidDescriptionException(ex, "database is of wrong type"); + } + } + if (map.containsKey("website")) { try { website = (String)map.get("website"); @@ -204,6 +221,7 @@ public final class PluginDescriptionFile { map.put("name", name); map.put("main", main); map.put("version", version); + map.put("database", database); if (commands != null) map.put("command", commands); if (depend != null) map.put("depend", depend); |