Skip to content

Commit

Permalink
v1.1.3 Update
Browse files Browse the repository at this point in the history
- Minor changes in pom.xml
- Fixed json importing
  • Loading branch information
AlbeMiglio committed Sep 2, 2020
1 parent 05e8414 commit 7f91cff
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>PowerLibAPI</artifactId>
<groupId>it.mycraft</groupId>
<version>1.1.2</version>
<version>1.1.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>PowerLibExample</artifactId>
Expand Down Expand Up @@ -59,7 +59,7 @@
<dependency>
<groupId>it.mycraft</groupId>
<artifactId>PowerLib</artifactId>
<version>1.1.2</version>
<version>1.1.3</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
6 changes: 3 additions & 3 deletions Java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>PowerLibAPI</artifactId>
<groupId>it.mycraft</groupId>
<version>1.1.2</version>
<version>1.1.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -98,8 +98,8 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20200518</version>
<scope>provided</scope>
<version>20190722</version>
<scope>compile</scope>
</dependency>
</dependencies>

Expand Down
12 changes: 6 additions & 6 deletions Java/src/main/java/it/mycraft/powerlib/utils/JSONUtils.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
package it.mycraft.powerlib.utils;

import org.json.JSONException;

import org.json.JSONObject;

import java.io.*;
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

public class JSONUtils {

public static JSONObject getJSON(String url) {
try {
InputStream is = new URL(url).openStream();
try {
BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
BufferedReader rd = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8));
String s = read(rd);
return new JSONObject(s);
} finally {
Expand All @@ -28,13 +28,13 @@ public static boolean isValidJSON(String url) {
try {
InputStream is = new URL(url).openStream();
try {
BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
String s = read(rd);
BufferedReader rd = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8));
read(rd);
return true;
} finally {
is.close();
}
} catch (JSONException | IOException ignored) {
} catch (IOException ignored) {
return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Java/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PowerLib
authors: [AlbeMiglio, pompiere1]
main: it.mycraft.powerlib.PowerLib
version: 1.1.2
version: 1.1.3
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>it.albemiglio.PowerLib</groupId>
<artifactId>PowerLib</artifactId>
<version>1.1.2</version>
<version>1.1.3</version>
</dependency>
</dependencies>
```
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>it.mycraft</groupId>
<artifactId>PowerLibAPI</artifactId>
<packaging>pom</packaging>
<version>1.1.2</version>
<version>1.1.3</version>
<modules>
<module>Example</module>
<module>Java</module>
Expand Down

0 comments on commit 7f91cff

Please sign in to comment.