diff --git a/Bungee/.classpath b/Bungee/.classpath
index 4559ca0..d4e0e69 100644
--- a/Bungee/.classpath
+++ b/Bungee/.classpath
@@ -13,7 +13,7 @@
-
+
diff --git a/Bungee/.settings/org.eclipse.jdt.core.prefs b/Bungee/.settings/org.eclipse.jdt.core.prefs
index 2af1e7b..1b835cb 100644
--- a/Bungee/.settings/org.eclipse.jdt.core.prefs
+++ b/Bungee/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,8 @@
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
-org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=16
+org.eclipse.jdt.core.compiler.compliance=16
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.compiler.source=16
diff --git a/Core/.classpath b/Core/.classpath
index 4559ca0..d4e0e69 100644
--- a/Core/.classpath
+++ b/Core/.classpath
@@ -13,7 +13,7 @@
-
+
diff --git a/Core/.settings/org.eclipse.jdt.core.prefs b/Core/.settings/org.eclipse.jdt.core.prefs
index 2af1e7b..1b835cb 100644
--- a/Core/.settings/org.eclipse.jdt.core.prefs
+++ b/Core/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,8 @@
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
-org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=16
+org.eclipse.jdt.core.compiler.compliance=16
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.compiler.source=16
diff --git a/Core/pom.xml b/Core/pom.xml
index ac6fc7c..508fbfa 100644
--- a/Core/pom.xml
+++ b/Core/pom.xml
@@ -27,16 +27,16 @@
${bungeecord.version}
compile
-
+
io.github.classgraph
classgraph
- 4.8.90
+ 4.8.108
compile
diff --git a/Core/src/main/java/fr/pandacube/lib/core/chat/ChatColorUtil.java b/Core/src/main/java/fr/pandacube/lib/core/chat/ChatColorUtil.java
index 99e3e4f..8026064 100644
--- a/Core/src/main/java/fr/pandacube/lib/core/chat/ChatColorUtil.java
+++ b/Core/src/main/java/fr/pandacube/lib/core/chat/ChatColorUtil.java
@@ -5,8 +5,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
-import org.javatuples.Pair;
-
import net.md_5.bungee.api.ChatColor;
public class ChatColorUtil {
@@ -257,10 +255,12 @@ public class ChatColorUtil {
public static class ChatValueGradient {
- List> colors = new ArrayList<>();
+ private record GradientValueColor(float value, ChatColor color) { }
+
+ List colors = new ArrayList<>();
public synchronized ChatValueGradient add(float v, ChatColor col) {
- colors.add(Pair.with(v, col));
+ colors.add(new GradientValueColor(v, col));
return this;
}
@@ -268,23 +268,23 @@ public class ChatColorUtil {
if (colors.isEmpty())
throw new IllegalStateException("Must define at least one color in this ChatValueGradient instance.");
if (colors.size() == 1)
- return colors.get(0).getValue1();
+ return colors.get(0).color();
- colors.sort((p1, p2) -> Float.compare(p1.getValue0(), p2.getValue0()));
+ colors.sort((p1, p2) -> Float.compare(p1.value(), p2.value()));
- if (v <= colors.get(0).getValue0())
- return colors.get(0).getValue1();
- if (v >= colors.get(colors.size() - 1).getValue0())
- return colors.get(colors.size() - 1).getValue1();
+ if (v <= colors.get(0).value())
+ return colors.get(0).color();
+ if (v >= colors.get(colors.size() - 1).value())
+ return colors.get(colors.size() - 1).color();
int p1 = 1;
for (; p1 < colors.size(); p1++) {
- if (colors.get(p1).getValue0() >= v)
+ if (colors.get(p1).value() >= v)
break;
}
int p0 = p1 - 1;
- float v0 = colors.get(p0).getValue0(), v1 = colors.get(p1).getValue0();
- ChatColor cc0 = colors.get(p0).getValue1(), cc1 = colors.get(p1).getValue1();
+ float v0 = colors.get(p0).value(), v1 = colors.get(p1).value();
+ ChatColor cc0 = colors.get(p0).color(), cc1 = colors.get(p1).color();
return interpolateColor(v0, v1, v, cc0, cc1);
}
diff --git a/Core/src/main/java/fr/pandacube/lib/core/db/DB.java b/Core/src/main/java/fr/pandacube/lib/core/db/DB.java
index b36c202..694cdc1 100644
--- a/Core/src/main/java/fr/pandacube/lib/core/db/DB.java
+++ b/Core/src/main/java/fr/pandacube/lib/core/db/DB.java
@@ -13,8 +13,6 @@ import java.util.Map;
import java.util.Objects;
import java.util.function.Consumer;
-import org.javatuples.Pair;
-
import fr.pandacube.lib.core.util.Log;
/**
@@ -70,12 +68,12 @@ public final class DB {
Collection> tableFields = elem.getFields().values();
boolean first = true;
for (SQLField f : tableFields) {
- Pair> statementPart = f.forSQLPreparedStatement();
- params.addAll(statementPart.getValue1());
+ ParameterizedSQLString statementPart = f.forSQLPreparedStatement();
+ params.addAll(statementPart.parameters());
if (!first) sql += ", ";
first = false;
- sql += statementPart.getValue0();
+ sql += statementPart.sqlString();
}
sql += ", PRIMARY KEY id(id))";
@@ -197,9 +195,9 @@ public final class DB {
List
-
+
diff --git a/Paper/.settings/org.eclipse.jdt.core.prefs b/Paper/.settings/org.eclipse.jdt.core.prefs
index 2af1e7b..1b835cb 100644
--- a/Paper/.settings/org.eclipse.jdt.core.prefs
+++ b/Paper/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,8 @@
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
-org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=16
+org.eclipse.jdt.core.compiler.compliance=16
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.compiler.source=16
diff --git a/pom.xml b/pom.xml
index bab1ff9..3a4162f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -37,8 +37,8 @@
unknown
- 11
- 11
+ 16
+ 16
UTF-8
1.16-R0.4-SNAPSHOT
@@ -54,11 +54,11 @@
- junit
- junit
- 4.12
- test
-
+ org.junit.jupiter
+ junit-jupiter-api
+ 5.7.2
+ test
+