diff --git a/pom.xml b/pom.xml index 43acf8a66..156ab48d7 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.cyberpwn phantom - 6 + 6.1 Phantom Phantom - Another Damn API diff --git a/src/main/java/org/cyberpwn/phantom/MySQLConnectionController.java b/src/main/java/org/cyberpwn/phantom/MySQLConnectionController.java index 600468e1f..9c2dfe46f 100644 --- a/src/main/java/org/cyberpwn/phantom/MySQLConnectionController.java +++ b/src/main/java/org/cyberpwn/phantom/MySQLConnectionController.java @@ -185,5 +185,4 @@ public String getCodeName() { return "mysql"; } - } diff --git a/src/main/java/org/cyberpwn/phantom/clust/ConfigurationHandler.java b/src/main/java/org/cyberpwn/phantom/clust/ConfigurationHandler.java index 4120e4e8f..89b8225ed 100644 --- a/src/main/java/org/cyberpwn/phantom/clust/ConfigurationHandler.java +++ b/src/main/java/org/cyberpwn/phantom/clust/ConfigurationHandler.java @@ -404,14 +404,14 @@ public static MySQL fromMysql(Configurable c, MySQL db) throws SQLException, Cla resx.next(); JSONObject jso = new JSONObject(resx.getString("d")); c.getConfiguration().addJson(jso); + toFields(c); + c.onReadConfig(); resx.close(); stx.close(); } res.close(); st.close(); - toFields(c); - c.onReadConfig(); return db; } @@ -430,6 +430,7 @@ public static MySQL fromMysql(Configurable c, MySQL db) throws SQLException, Cla */ public static MySQL toMysql(Configurable c, MySQL db) throws SQLException, ClassNotFoundException { + fromFields(c); Connection conn = null; if(!db.checkConnection()) diff --git a/src/main/java/org/cyberpwn/phantom/clust/DataCluster.java b/src/main/java/org/cyberpwn/phantom/clust/DataCluster.java index 6cf05ce2d..9c5774511 100644 --- a/src/main/java/org/cyberpwn/phantom/clust/DataCluster.java +++ b/src/main/java/org/cyberpwn/phantom/clust/DataCluster.java @@ -286,6 +286,18 @@ else if(o instanceof List) set(key, l); } + + else if(o instanceof JSONArray) + { + List l = new ArrayList(); + + for(Object i : ((JSONArray)o)) + { + l.add(i.toString()); + } + + set(key, l); + } } /** diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 8801cd174..93f46291b 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,9 +1,10 @@ name: Phantom -version: 6 +version: 6.1 main: org.cyberpwn.phantom.Phantom description: Phantom - Another Damn API author: cyberpwn authors: [cyberpwn] +depend: [ProtocolLib] website: http://cyberpwn.org/docs/phantom/ commands: phantom: