From 76e1ef06380c25cd787477b5b30d96c1607eb87e Mon Sep 17 00:00:00 2001
From: KesSaft <72557998+KesSaft@users.noreply.github.com>
Date: Sat, 11 Jan 2025 22:23:03 +0100
Subject: [PATCH 1/3] fix for java version 23
---
.idea/.gitignore | 3 ++
.idea/compiler.xml | 13 ++++++
.idea/encodings.xml | 7 ++++
.idea/jarRepositories.xml | 40 +++++++++++++++++++
.idea/misc.xml | 12 ++++++
.idea/modules.xml | 8 ++++
.idea/vcs.xml | 7 ++++
autonick.iml | 13 ++++++
pom.xml | 13 ++++++
src/main/java/de/jan/autonick/AutoNick.java | 16 +++-----
.../config/AutoNickConfiguration.java | 9 +----
11 files changed, 122 insertions(+), 19 deletions(-)
create mode 100644 .idea/.gitignore
create mode 100644 .idea/compiler.xml
create mode 100644 .idea/encodings.xml
create mode 100644 .idea/jarRepositories.xml
create mode 100644 .idea/misc.xml
create mode 100644 .idea/modules.xml
create mode 100644 .idea/vcs.xml
create mode 100644 autonick.iml
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..35f4cf1
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..aa00ffa
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 0000000..d2e91cb
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..9dc782b
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..6c0908e
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..8306744
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/autonick.iml b/autonick.iml
new file mode 100644
index 0000000..a589521
--- /dev/null
+++ b/autonick.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+ SPIGOT
+
+ 1
+
+
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index b046137..2d24187 100644
--- a/pom.xml
+++ b/pom.xml
@@ -61,6 +61,19 @@
+
+ maven-assembly-plugin
+
+
+
+ com.beginsecure.App
+
+
+
+ jar-with-dependencies
+
+
+
diff --git a/src/main/java/de/jan/autonick/AutoNick.java b/src/main/java/de/jan/autonick/AutoNick.java
index 1317dc0..ebc484e 100644
--- a/src/main/java/de/jan/autonick/AutoNick.java
+++ b/src/main/java/de/jan/autonick/AutoNick.java
@@ -1,15 +1,9 @@
package de.jan.autonick;
+import de.jan.autonick.commands.NickCommand;
import de.jan.autonick.config.AutoNickConfiguration;
import de.jan.autonick.database.DatabaseRegistry;
-import de.jan.autonick.commands.NickCommand;
-import de.jan.autonick.listener.InventoryClickListener;
-import de.jan.autonick.listener.PlayerChatListener;
-import de.jan.autonick.listener.PlayerInteractListener;
-import de.jan.autonick.listener.PlayerJoinListener;
-import de.jan.autonick.listener.PlayerQuitListener;
-import org.bstats.bukkit.Metrics;
-import org.bstats.charts.SimplePie;
+import de.jan.autonick.listener.*;
import org.bukkit.Bukkit;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
@@ -52,9 +46,9 @@ public void onEnable() {
}
/* METRICS */
- final int pluginId = 8730;
- final Metrics metrics = new Metrics(this, pluginId);
- metrics.addCustomChart(new SimplePie("bungeecord", () -> String.valueOf(configuration.isBungeeCord())));
+ //final int pluginId = 8730;
+ //final Metrics metrics = new Metrics(this, pluginId);
+ //metrics.addCustomChart(new SimplePie("bungeecord", () -> String.valueOf(configuration.isBungeeCord())));
}
@Override
diff --git a/src/main/java/de/jan/autonick/config/AutoNickConfiguration.java b/src/main/java/de/jan/autonick/config/AutoNickConfiguration.java
index 2bab5ba..8c66545 100644
--- a/src/main/java/de/jan/autonick/config/AutoNickConfiguration.java
+++ b/src/main/java/de/jan/autonick/config/AutoNickConfiguration.java
@@ -3,7 +3,6 @@
import de.jan.autonick.AutoNick;
import java.io.*;
-import java.nio.charset.StandardCharsets;
import org.bukkit.ChatColor;
import org.bukkit.configuration.file.FileConfiguration;
@@ -18,13 +17,7 @@ public class AutoNickConfiguration {
public AutoNickConfiguration(AutoNick plugin) {
plugin.saveDefaultConfig();
- try {
- this.configuration = YamlConfiguration.loadConfiguration(
- new BufferedReader(new InputStreamReader(new FileInputStream(new File(plugin.getDataFolder(), "config.yml")), StandardCharsets.UTF_8)));
- } catch (FileNotFoundException ex) {
- ex.printStackTrace();
- return;
- }
+ this.configuration = YamlConfiguration.loadConfiguration(new File(plugin.getDataFolder(), "config.yml"));
this.bungeeCord = this.getBoolean("bungeecord");
}
From f74800b3f64bd6852052ccf9767705c1c1870725 Mon Sep 17 00:00:00 2001
From: KesSaft <72557998+KesSaft@users.noreply.github.com>
Date: Fri, 17 Jan 2025 21:20:16 +0100
Subject: [PATCH 2/3] Delete .idea directory
---
.idea/.gitignore | 3 ---
.idea/compiler.xml | 13 -------------
.idea/encodings.xml | 7 -------
.idea/jarRepositories.xml | 40 ---------------------------------------
.idea/misc.xml | 12 ------------
.idea/modules.xml | 8 --------
.idea/vcs.xml | 7 -------
7 files changed, 90 deletions(-)
delete mode 100644 .idea/.gitignore
delete mode 100644 .idea/compiler.xml
delete mode 100644 .idea/encodings.xml
delete mode 100644 .idea/jarRepositories.xml
delete mode 100644 .idea/misc.xml
delete mode 100644 .idea/modules.xml
delete mode 100644 .idea/vcs.xml
diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 26d3352..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
deleted file mode 100644
index 35f4cf1..0000000
--- a/.idea/compiler.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
deleted file mode 100644
index aa00ffa..0000000
--- a/.idea/encodings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
deleted file mode 100644
index d2e91cb..0000000
--- a/.idea/jarRepositories.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 9dc782b..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 6c0908e..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 8306744..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
From b66d2897194b988b521e8e5b624f73b8d5b842a5 Mon Sep 17 00:00:00 2001
From: KesSaft <72557998+KesSaft@users.noreply.github.com>
Date: Fri, 17 Jan 2025 21:22:03 +0100
Subject: [PATCH 3/3] update .gitignore & fix maven-assembly-plugin main class
---
.gitignore | 1 +
pom.xml | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 007eb90..f06a52b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
# Remove config
/config/
+.idea
.gradle
**/build/
!src/**/build/
diff --git a/pom.xml b/pom.xml
index 2d24187..b5b8dec 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,7 +66,7 @@
- com.beginsecure.App
+ de.jan.autonick.AutoNick