Skip to content

Commit

Permalink
Use java 17 and mc 1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
ibot3 committed Oct 9, 2022
1 parent ecf3aba commit 6b0ecf3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Expand Up @@ -21,8 +21,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
<plugin>
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/net/vyhub/VyHubMinecraft/lib/Cache.java
Expand Up @@ -3,6 +3,7 @@
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.lang.reflect.Type;
Expand Down Expand Up @@ -39,7 +40,14 @@ public void save(T data) {
throw new IllegalArgumentException("Data cannot be null");
}

try (FileWriter file = new FileWriter(filename)) {
File f = new File(filename);

if (!f.exists()) {
File parent = f.getParentFile();
parent.mkdirs();
}

try (FileWriter file = new FileWriter(f)) {
file.write(toJson(data));
file.flush();
} catch (IOException e) {
Expand Down
Expand Up @@ -61,7 +61,7 @@ public static void patchServer() {
if (user != null) {
HashMap<String, Object> map = new HashMap<>();
HashMap<String, String> extra = new HashMap<>();
extra.put("Ping", player.getPing() + " ms");
// extra.put("Ping", player.getPing() + " ms");
// extra.put("World", player.getWorld().getName());

map.put("user_id", user.getId());
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
@@ -1,7 +1,7 @@
name: VyHub
version: '${project.version}'
main: net.vyhub.VyHubMinecraft.VyHub
api-version: 1.18
api-version: 1.13

depend:
- LuckPerms
Expand Down

0 comments on commit 6b0ecf3

Please sign in to comment.