diff --git a/.run/CoreMaster.run.xml b/.run/CoreMaster.run.xml
index d9b6b1c..e7c386b 100644
--- a/.run/CoreMaster.run.xml
+++ b/.run/CoreMaster.run.xml
@@ -1,17 +1,19 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/API/src/main/java/net/juligames/core/api/API.java b/API/src/main/java/net/juligames/core/api/API.java
index 686035d..d21192c 100644
--- a/API/src/main/java/net/juligames/core/api/API.java
+++ b/API/src/main/java/net/juligames/core/api/API.java
@@ -152,6 +152,7 @@ public interface API extends Logging {
/**
* When using a {@link LogManager} you should use {@link API#getJavaLogManager()} to get hold of it
+ *
* @return an {@link LogManager} instance that is or acts like {@link LogManager#getLogManager()}
* @apiNote This is not associated with the {@link de.bentzin.tools.logging} package and environment
*/
diff --git a/API/src/main/java/net/juligames/core/api/config/EnumInterpreter.java b/API/src/main/java/net/juligames/core/api/config/EnumInterpreter.java
index 809a46b..b7b279e 100644
--- a/API/src/main/java/net/juligames/core/api/config/EnumInterpreter.java
+++ b/API/src/main/java/net/juligames/core/api/config/EnumInterpreter.java
@@ -30,9 +30,9 @@
* }
* }
*
+ *
* @author Ture Bentzin
* 15.03.2023
-
*/
@ApiStatus.AvailableSince("1.5")
@ApiStatus.Experimental
diff --git a/API/src/main/java/net/juligames/core/api/config/Interpreter.java b/API/src/main/java/net/juligames/core/api/config/Interpreter.java
index bc8196b..7f06ceb 100644
--- a/API/src/main/java/net/juligames/core/api/config/Interpreter.java
+++ b/API/src/main/java/net/juligames/core/api/config/Interpreter.java
@@ -14,7 +14,7 @@
* This is an example implementation for interpreting Integers
*
* {@code
-
+ *
* public final class IntegerInterpreter implements Interpreter {
*
* @Override
@@ -93,7 +93,7 @@ default void reverseAndThenComplete(@NotNull T t, @NotNull CompletableFuture
* CompletableFuture with the result of the interpretation. This process is known as "interpreting the input as an
* instance of Type T". If the interpretation fails, an Exception will be thrown.
*
- * @param input the input to be interpreted
+ * @param input the input to be interpreted
* @param completableFuture the CompletableFuture that should be completed with the result of the interpretation
* @throws Exception will be thrown if the input cant be interpreted according to this implementation
*/
diff --git a/API/src/main/java/net/juligames/core/api/config/PrimitiveInterpreter.java b/API/src/main/java/net/juligames/core/api/config/PrimitiveInterpreter.java
index 6761432..2fdecf0 100644
--- a/API/src/main/java/net/juligames/core/api/config/PrimitiveInterpreter.java
+++ b/API/src/main/java/net/juligames/core/api/config/PrimitiveInterpreter.java
@@ -5,16 +5,18 @@
/**
* This might be used later outside of this package
+ *
* @author Ture Bentzin
* 12.04.2023
*/
@ApiStatus.Internal
@ApiStatus.AvailableSince("1.6")
-public sealed interface PrimitiveInterpreter permits Interpreter{
+public sealed interface PrimitiveInterpreter permits Interpreter {
/**
* Converts the given input according to this implementation to a given Object of the provided Type.
* This process is known as "interpreting the input as an instance of Type T"
+ *
* @param input the input to be interpreted
* @return the instance of T that results the interpretation
* @throws Exception will be thrown if the input cant be interpreted according to this implementation
diff --git a/API/src/main/java/net/juligames/core/api/config/Reverser.java b/API/src/main/java/net/juligames/core/api/config/Reverser.java
index 89828be..a718505 100644
--- a/API/src/main/java/net/juligames/core/api/config/Reverser.java
+++ b/API/src/main/java/net/juligames/core/api/config/Reverser.java
@@ -18,9 +18,10 @@ public sealed interface Reverser permits Interpreter, Reverser.PrivateReverse
/**
* The function#apply should never return null
+ *
* @param function the function
+ * @param Type
* @return a reverser based on the function
- * @param Type
*/
@Contract(pure = true)
static @NotNull Reverser ofFunctional(@NotNull Function function) {
@@ -30,9 +31,10 @@ public sealed interface Reverser permits Interpreter, Reverser.PrivateReverse
/**
* This will return a new {@link Reverser} that will execute the {@link #reverse(Object)} method from the given
* tReverser. This only benefits of you want to prevent casting this {@link Reverser} to a {@link Interpreter}!
+ *
* @param tReverser the reverser
+ * @param T
* @return a new reverser
- * @param T
*/
@ApiStatus.Experimental
@Contract(pure = true)
@@ -44,8 +46,9 @@ public sealed interface Reverser permits Interpreter, Reverser.PrivateReverse
* This {@link Reverser} will reverse the given object ONLY based on its toString!
* Should only be used with EXTREME caution!
* This does not respect {@link CustomInterpretable}
- * @return a new reverser
+ *
* @param T
+ * @return a new reverser
*/
@ApiStatus.Experimental
@Contract(pure = true)
@@ -57,8 +60,9 @@ public sealed interface Reverser permits Interpreter, Reverser.PrivateReverse
* This {@link Reverser} will reverse the given object ONLY based on its {@link String#valueOf(Object)}!
* Should only be used with EXTREME caution!
* This does not respect {@link CustomInterpretable}
- * @return a new reverser
+ *
* @param T
+ * @return a new reverser
*/
@ApiStatus.Experimental
@Contract(pure = true)
@@ -81,6 +85,7 @@ public sealed interface Reverser permits Interpreter, Reverser.PrivateReverse
/**
* Meant ONLY for use with {@link #ofFunctional(Function)}
+ *
* @param the type
*/
@ApiStatus.Internal
diff --git a/API/src/main/java/net/juligames/core/api/config/mapbacked/DictionaryFeedInterpreter.java b/API/src/main/java/net/juligames/core/api/config/mapbacked/DictionaryFeedInterpreter.java
index 58b352d..7bef683 100644
--- a/API/src/main/java/net/juligames/core/api/config/mapbacked/DictionaryFeedInterpreter.java
+++ b/API/src/main/java/net/juligames/core/api/config/mapbacked/DictionaryFeedInterpreter.java
@@ -32,7 +32,7 @@ public DictionaryFeedInterpreter(@NotNull Supplier> dictio
/**
* Constructs a new {@link DictionaryFeedInterpreter} instance with the given dictionary supplier and map part factory.
*
- * @param dictionarySupplier the supplier to use to provide the backing dictionary
+ * @param dictionarySupplier the supplier to use to provide the backing dictionary
* @param dictionaryPartFactory the function to use to create map parts based on the dictionary and the key
*/
public DictionaryFeedInterpreter(@NotNull Supplier> dictionarySupplier,
@@ -64,7 +64,7 @@ public DictionaryFeedInterpreter(@NotNull Supplier> dictio
/**
* Creates a new map part with the given key and dictionary supplier using the factory function.
*
- * @param key the key of the new map part
+ * @param key the key of the new map part
* @param dictionarySupplier the dictionary supplier to use for the new map part
* @return the newly created map part
*/
diff --git a/API/src/main/java/net/juligames/core/api/config/mapbacked/MapFeedInterpreter.java b/API/src/main/java/net/juligames/core/api/config/mapbacked/MapFeedInterpreter.java
index 71851f6..93a4130 100644
--- a/API/src/main/java/net/juligames/core/api/config/mapbacked/MapFeedInterpreter.java
+++ b/API/src/main/java/net/juligames/core/api/config/mapbacked/MapFeedInterpreter.java
@@ -49,11 +49,11 @@ public MapFeedInterpreter(@NotNull Supplier> mapSupplier,
}
public @NotNull MapPart fabricate(@NotNull String key, @NotNull Supplier> mapSupplier) {
- return mapPartFactory.apply(key,mapSupplier);
+ return mapPartFactory.apply(key, mapSupplier);
}
protected @NotNull MapPart fabricate(@NotNull String key) {
- return mapPartFactory.apply(key,mapSupplier);
+ return mapPartFactory.apply(key, mapSupplier);
}
private record MapPartImpl(String key, Supplier> mapSupplier) implements MapPart {
diff --git a/API/src/main/java/net/juligames/core/api/config/property/PropertyInterpreter.java b/API/src/main/java/net/juligames/core/api/config/property/PropertyInterpreter.java
index e6e1326..d76f9f2 100644
--- a/API/src/main/java/net/juligames/core/api/config/property/PropertyInterpreter.java
+++ b/API/src/main/java/net/juligames/core/api/config/property/PropertyInterpreter.java
@@ -12,7 +12,7 @@
* be used as the "key" for getting the property. If you {@link #reverse(Object)} then {@link String#valueOf(Object)}
* will be used
*
- * This is an example on how to use the {@link PropertyInterpreter} specifically the {@link PropertyInterpreter#stringPropertyInterpreter()}
+ * This is an example on how to use the {@link PropertyInterpreter} specifically the {@link PropertyInterpreter#stringPropertyInterpreter()}
*
*
* {@code
diff --git a/API/src/main/java/net/juligames/core/api/config/representations/Interpretation.java b/API/src/main/java/net/juligames/core/api/config/representations/Interpretation.java
index 7a58036..5a84a7f 100644
--- a/API/src/main/java/net/juligames/core/api/config/representations/Interpretation.java
+++ b/API/src/main/java/net/juligames/core/api/config/representations/Interpretation.java
@@ -9,14 +9,14 @@
* 17.04.2023
*/
@ApiStatus.AvailableSince("1.6")
-public abstract class Interpretation implements Representation{
+public abstract class Interpretation implements Representation {
+
+ public final @NotNull PrimitiveInterpreter interpreter;
public Interpretation(@NotNull PrimitiveInterpreter interpreter) {
this.interpreter = interpreter;
}
- public final @NotNull PrimitiveInterpreter interpreter;
-
@Override
public final @NotNull T represent() {
try {
diff --git a/API/src/main/java/net/juligames/core/api/external/AdventureWebuiEditorAPI.java b/API/src/main/java/net/juligames/core/api/external/AdventureWebuiEditorAPI.java
index 5895b2d..084a32f 100644
--- a/API/src/main/java/net/juligames/core/api/external/AdventureWebuiEditorAPI.java
+++ b/API/src/main/java/net/juligames/core/api/external/AdventureWebuiEditorAPI.java
@@ -79,6 +79,7 @@ public final class AdventureWebuiEditorAPI {
public AdventureWebuiEditorAPI(final @NotNull URI root) {
this(root, HttpClient.newHttpClient());
}
+
/**
* Creates a new instance of the editor API with the default JuliGames api
*/
@@ -200,7 +201,7 @@ public AdventureWebuiEditorAPI(final @NotNull HttpClient client) {
/**
* @param command command with {token}
- * @param app app
+ * @param app app
* @return the link
*/
@Contract(pure = true)
@@ -215,7 +216,7 @@ public AdventureWebuiEditorAPI(final @NotNull HttpClient client) {
/**
* @param message the initial message
* @param command command with {token}
- * @param app app
+ * @param app app
* @return the link
*/
@Contract(pure = true)
diff --git a/API/src/main/java/net/juligames/core/api/message/MessageRecipient.java b/API/src/main/java/net/juligames/core/api/message/MessageRecipient.java
index 0f55b53..3fafc43 100644
--- a/API/src/main/java/net/juligames/core/api/message/MessageRecipient.java
+++ b/API/src/main/java/net/juligames/core/api/message/MessageRecipient.java
@@ -39,7 +39,7 @@ public interface MessageRecipient {
* specified.
*
* @return the default locale that is distributed by the master, or the locale of this MessageRecipient if
- * specified
+ * specified
*/
default @Nullable String supplyLocaleOrDefault() {
if (supplyLocale() != null) {
@@ -49,11 +49,10 @@ public interface MessageRecipient {
}
/**
+ * @param miniMessage the miniMessage string to deliver
* @deprecated Use {@link #deliver(Message)} instead.
*
* Delivers a miniMessage string to the recipient.
- *
- * @param miniMessage the miniMessage string to deliver
*/
@Deprecated
@ApiStatus.Internal
diff --git a/API/src/main/java/net/juligames/core/api/message/MiniMessageSerializer.java b/API/src/main/java/net/juligames/core/api/message/MiniMessageSerializer.java
index c34fd1e..1fa4361 100644
--- a/API/src/main/java/net/juligames/core/api/message/MiniMessageSerializer.java
+++ b/API/src/main/java/net/juligames/core/api/message/MiniMessageSerializer.java
@@ -5,6 +5,7 @@
/**
* This interface provides methods for serializing a MiniMessage to plain text or legacy format.
* It also provides methods for translating legacy format messages to MiniMessage format.
+ *
* @author Ture Bentzin
* 25.12.2022
*/
diff --git a/API/src/main/java/net/juligames/core/api/message/PatternType.java b/API/src/main/java/net/juligames/core/api/message/PatternType.java
index dfe8bdc..6c2f2af 100644
--- a/API/src/main/java/net/juligames/core/api/message/PatternType.java
+++ b/API/src/main/java/net/juligames/core/api/message/PatternType.java
@@ -71,7 +71,7 @@ public enum PatternType {
* Converts a pattern string to a tag string.
*
* @param target the target string to convert
- * @param index the integer index to use in the tag
+ * @param index the integer index to use in the tag
* @return the converted tag string
*/
public @NotNull String convertPatternToTag(@NotNull String target, int index) {
diff --git a/API/src/main/java/net/juligames/core/api/misc/APIUtils.java b/API/src/main/java/net/juligames/core/api/misc/APIUtils.java
index 79e6441..9af2309 100644
--- a/API/src/main/java/net/juligames/core/api/misc/APIUtils.java
+++ b/API/src/main/java/net/juligames/core/api/misc/APIUtils.java
@@ -142,7 +142,8 @@ public static Optional executeAndReturnFirstSuccess(Supplier @NotNull
for (Supplier supplier : suppliers) {
try {
return Optional.of(supplier.get());
- }catch (Exception ignore) {}
+ } catch (Exception ignore) {
+ }
}
return Optional.empty();
}
diff --git a/API/src/main/java/net/juligames/core/api/misc/DurationFormatUtils.java b/API/src/main/java/net/juligames/core/api/misc/DurationFormatUtils.java
index 0c56858..df83d4f 100644
--- a/API/src/main/java/net/juligames/core/api/misc/DurationFormatUtils.java
+++ b/API/src/main/java/net/juligames/core/api/misc/DurationFormatUtils.java
@@ -77,6 +77,26 @@ public class DurationFormatUtils {
static final @NotNull Object S = "S";
public static @NotNull String INTERNAL_MESSAGE_PREFIX = "internal.api.misc.format.";
+ static {
+ API.get().getAPILogger().info(DurationFormatUtils.class.getName() + " was loaded! Trying to register default messages:");
+ long s1 = System.currentTimeMillis();
+ try {
+ registerMessages();
+ //BIT
+ final long between = s1 - System.currentTimeMillis();
+ Duration duration = Duration.ofMillis(between);
+ String formatDurationWords = formatDurationWords(duration, false, false, null,
+ API.get().getMessageApi().defaultUtilLocale());
+ API.get().getAPILogger().info("finished registration of default messages! (took: " + formatDurationWords + ")");
+ } catch (Exception e) {
+ API.get().getAPILogger().warning("failed to register default messages: " + e);
+ ThrowableDebug.debug(e);
+ }
+
+ }
+
+ //-----------------------------------------------------------------------
+
/**
* DurationFormatUtils instances should NOT be constructed in standard programming.
*
@@ -87,8 +107,6 @@ public DurationFormatUtils() {
super();
}
- //-----------------------------------------------------------------------
-
/**
* Formats the time gap as a string.
*
@@ -244,24 +262,6 @@ public DurationFormatUtils() {
suppressTrailingZeroElements, getLocalisationFromMessageSystem(locale, s));
}
- static {
- API.get().getAPILogger().info(DurationFormatUtils.class.getName() + " was loaded! Trying to register default messages:");
- long s1 = System.currentTimeMillis();
- try {
- registerMessages();
- //BIT
- final long between = s1 - System.currentTimeMillis();
- Duration duration = Duration.ofMillis(between);
- String formatDurationWords = formatDurationWords(duration, false, false, null,
- API.get().getMessageApi().defaultUtilLocale());
- API.get().getAPILogger().info("finished registration of default messages! (took: " + formatDurationWords + ")");
- }catch (Exception e){
- API.get().getAPILogger().warning("failed to register default messages: " + e);
- ThrowableDebug.debug(e);
- }
-
- }
-
public static void registerMessages() {
registerDefaultMessage("days");
registerDefaultMessage("hours");
diff --git a/API/src/main/java/net/juligames/core/api/misc/EntryInterpretationUtil.java b/API/src/main/java/net/juligames/core/api/misc/EntryInterpretationUtil.java
index e588d3d..f5bf9c7 100644
--- a/API/src/main/java/net/juligames/core/api/misc/EntryInterpretationUtil.java
+++ b/API/src/main/java/net/juligames/core/api/misc/EntryInterpretationUtil.java
@@ -84,11 +84,11 @@ private EntryInterpretationUtil() {
}).collect(Collectors.toUnmodifiableSet());
}
- public static @Unmodifiable @NotNull Map interpretMap(@NotNull Map map, @NotNull Interpreter kInterpreter, @NotNull Interpreter vInterpreter) {
+ public static @Unmodifiable @NotNull Map interpretMap(@NotNull Map map, @NotNull Interpreter kInterpreter, @NotNull Interpreter vInterpreter) {
return Map.ofEntries(interpretEntries(map.entrySet(), kInterpreter, vInterpreter).toArray((IntFunction[]>) value -> new Map.Entry[0]));
}
- public static @Unmodifiable @NotNull Map reverseMap(@NotNull Map map, @NotNull Interpreter kInterpreter, @NotNull Interpreter vInterpreter) {
+ public static @Unmodifiable @NotNull Map reverseMap(@NotNull Map map, @NotNull Interpreter kInterpreter, @NotNull Interpreter vInterpreter) {
return Map.ofEntries(reverseEntries(map.entrySet(), kInterpreter, vInterpreter).toArray((IntFunction[]>) value -> new Map.Entry[0]));
}
diff --git a/API/src/main/java/net/juligames/core/api/misc/Predicates.java b/API/src/main/java/net/juligames/core/api/misc/Predicates.java
index 3b77c89..0f5fa0f 100644
--- a/API/src/main/java/net/juligames/core/api/misc/Predicates.java
+++ b/API/src/main/java/net/juligames/core/api/misc/Predicates.java
@@ -9,9 +9,10 @@
/**
* This class provides predicates
- * @implNote might use {@link APIUtils#executedWithoutExceptionL(Runnable)} later
+ *
* @author Ture Bentzin
* 19.05.2023
+ * @implNote might use {@link APIUtils#executedWithoutExceptionL(Runnable)} later
*/
public class Predicates {
diff --git a/API/src/main/java/net/juligames/core/api/misc/ThrowableDebug.java b/API/src/main/java/net/juligames/core/api/misc/ThrowableDebug.java
index e00d4c1..834d5e5 100644
--- a/API/src/main/java/net/juligames/core/api/misc/ThrowableDebug.java
+++ b/API/src/main/java/net/juligames/core/api/misc/ThrowableDebug.java
@@ -1,7 +1,6 @@
package net.juligames.core.api.misc;
import net.juligames.core.api.API;
-import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import java.io.PrintWriter;
diff --git a/API/src/main/java/net/juligames/core/api/misc/ThrowingRunnable.java b/API/src/main/java/net/juligames/core/api/misc/ThrowingRunnable.java
index f6dba90..20966f7 100644
--- a/API/src/main/java/net/juligames/core/api/misc/ThrowingRunnable.java
+++ b/API/src/main/java/net/juligames/core/api/misc/ThrowingRunnable.java
@@ -5,6 +5,7 @@
/**
* Like a normal {@link Runnable} but it accepts Exceptions
+ *
* @author Ture Bentzin
* 10.04.2023
*/
diff --git a/AdventureAPI/src/main/java/net/juligames/core/adventure/AdventureTagManager.java b/AdventureAPI/src/main/java/net/juligames/core/adventure/AdventureTagManager.java
index 703b2d8..4b14ba2 100644
--- a/AdventureAPI/src/main/java/net/juligames/core/adventure/AdventureTagManager.java
+++ b/AdventureAPI/src/main/java/net/juligames/core/adventure/AdventureTagManager.java
@@ -49,6 +49,7 @@ public interface AdventureTagManager extends MiniMessageSerializer {
/**
* This method creates a new {@link TagResolver} that combines {@link #getResolver()} and append
+ *
* @param append additional resolvers
* @return a new {@link TagResolver}
*/
diff --git a/AdventureAPI/src/main/java/net/juligames/core/adventure/api/AudienceMessageRecipient.java b/AdventureAPI/src/main/java/net/juligames/core/adventure/api/AudienceMessageRecipient.java
index a9a6bf4..abe9390 100644
--- a/AdventureAPI/src/main/java/net/juligames/core/adventure/api/AudienceMessageRecipient.java
+++ b/AdventureAPI/src/main/java/net/juligames/core/adventure/api/AudienceMessageRecipient.java
@@ -6,7 +6,6 @@
import net.juligames.core.api.message.MessageRecipient;
import net.kyori.adventure.audience.Audience;
import net.kyori.adventure.identity.Identity;
-import net.kyori.adventure.pointer.Pointered;
import net.kyori.adventure.text.Component;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
diff --git a/AdventureAPI/src/main/java/net/juligames/core/adventure/api/prompt/BackedPrompt.java b/AdventureAPI/src/main/java/net/juligames/core/adventure/api/prompt/BackedPrompt.java
index d606484..487b5ed 100644
--- a/AdventureAPI/src/main/java/net/juligames/core/adventure/api/prompt/BackedPrompt.java
+++ b/AdventureAPI/src/main/java/net/juligames/core/adventure/api/prompt/BackedPrompt.java
@@ -4,7 +4,6 @@
import de.bentzin.conversationlib.prompt.Prompt;
import de.bentzin.conversationlib.prompt.ValidatingPrompt;
import de.bentzin.tools.misc.SubscribableType;
-import net.juligames.core.api.config.Interpreter;
import net.juligames.core.api.config.PrimitiveInterpreter;
import net.juligames.core.api.misc.APIUtils;
import org.jetbrains.annotations.ApiStatus;
diff --git a/AdventureAPI/src/main/java/net/juligames/core/adventure/api/prompt/MapBackedPrompt.java b/AdventureAPI/src/main/java/net/juligames/core/adventure/api/prompt/MapBackedPrompt.java
index 2ca50ae..aab9bc9 100644
--- a/AdventureAPI/src/main/java/net/juligames/core/adventure/api/prompt/MapBackedPrompt.java
+++ b/AdventureAPI/src/main/java/net/juligames/core/adventure/api/prompt/MapBackedPrompt.java
@@ -21,7 +21,7 @@ public abstract class MapBackedPrompt extends ValidatingPrompt {
private final Map map;
- public MapBackedPrompt(@NotNull Map map) {
+ public MapBackedPrompt(@NotNull Map map) {
this.map = map;
}
diff --git a/AdventureCore/src/main/java/net/juligames/core/adventure/CoreAdventureTagManager.java b/AdventureCore/src/main/java/net/juligames/core/adventure/CoreAdventureTagManager.java
index cbcab71..8dbdc86 100644
--- a/AdventureCore/src/main/java/net/juligames/core/adventure/CoreAdventureTagManager.java
+++ b/AdventureCore/src/main/java/net/juligames/core/adventure/CoreAdventureTagManager.java
@@ -5,7 +5,6 @@
import net.juligames.core.api.jdbi.DBReplacement;
import net.juligames.core.api.jdbi.ReplacementDAO;
import net.juligames.core.api.message.Message;
-import net.juligames.core.api.message.MiniMessageSerializer;
import net.juligames.core.api.message.PatternType;
import net.juligames.core.api.message.TagManager;
import net.kyori.adventure.text.Component;
diff --git a/Core/src/main/java/net/juligames/core/Core.java b/Core/src/main/java/net/juligames/core/Core.java
index 2cf0d0f..aef0bde 100644
--- a/Core/src/main/java/net/juligames/core/Core.java
+++ b/Core/src/main/java/net/juligames/core/Core.java
@@ -173,14 +173,13 @@ public void start(String core_name, @NotNull Logger logger, boolean member) {
.addMessageListener(coreNotificationApi);
- if(getHazelDataApi().isMasterInformationAvailable())
- {
+ if (getHazelDataApi().isMasterInformationAvailable()) {
if (!Boolean.getBoolean("acknowledgeUnsafeMasterCheck")) {
coreLogger.info("checking compatibility with master..");
final String masterVersion = getHazelDataApi().getMasterInformation().get("master_version");
- if(masterVersion == null) {
+ if (masterVersion == null) {
coreLogger.error("Flawed data! Please check if hazelcast is working correctly and if your master" +
- " is operating normal! If you see this message on your Master, you should get in touch with me at " +
+ " is operating normal! If you see this message on your Master, you should get in touch with me at " +
"mailto://bentzin@tdrstudios.de! Thank you for using JuliGamesCore. It is likely that your JuliGamesCore Cluster " +
"starts but you should expect severe issues after reading this message!");
}
@@ -196,8 +195,8 @@ public void start(String core_name, @NotNull Logger logger, boolean member) {
coreLogger.warning("********************************************************");
}
}
- }
- else logger.debug("master information is not available! If you see this on the Master it is expected behavior");
+ } else
+ logger.debug("master information is not available! If you see this on the Master it is expected behavior");
logger.info("hooking to shutdown...");
getJavaRuntime().addShutdownHook(new Thread(() -> {
diff --git a/Core/src/main/java/net/juligames/core/hcast/HazelConnector.java b/Core/src/main/java/net/juligames/core/hcast/HazelConnector.java
index dc29153..dbf1a38 100644
--- a/Core/src/main/java/net/juligames/core/hcast/HazelConnector.java
+++ b/Core/src/main/java/net/juligames/core/hcast/HazelConnector.java
@@ -70,6 +70,7 @@ public void disconnect() {
/**
* This method acts like {@link #disconnect()} but cant throw an {@link Exception} and does not wait for population of
* the {@link #instance} field!
+ *
* @return an Optional that might contain an {@link Exception} that was thrown while trying to kill hazelcast
*/
@ApiStatus.Internal
@@ -79,7 +80,7 @@ public void disconnect() {
Objects.requireNonNull(instance.getNow(null), "cant kill instance! Your cluster might be bricked now...")
.shutdown();
return Optional.empty();
- }catch (Exception e) {
+ } catch (Exception e) {
e.printStackTrace(); //print but do not propagate!
return Optional.of(e);
}
@@ -99,6 +100,7 @@ public HazelcastInstance getForce() {
* Get the configured {@link #clientName}.
* This represents a memberName if this {@link HazelConnector} is used for members (masters) or a real clientName if it is
* used for creating members
+ *
* @return the clientName
*/
protected @NotNull String getClientName() {
diff --git a/HazelAPI/src/main/java/net/juligames/core/api/hazel/NativeHazelDataAPI.java b/HazelAPI/src/main/java/net/juligames/core/api/hazel/NativeHazelDataAPI.java
index 065d33a..46adf8f 100644
--- a/HazelAPI/src/main/java/net/juligames/core/api/hazel/NativeHazelDataAPI.java
+++ b/HazelAPI/src/main/java/net/juligames/core/api/hazel/NativeHazelDataAPI.java
@@ -74,11 +74,12 @@ public interface NativeHazelDataAPI {
* This method can be used to automatically determine the type of hazel!
* The implementation might be changed over a version.
* This one should not be used outside user interface applications
- * @apiNote The implementation currently uses {@link #getAll()} and {@link java.util.function.Predicate}s to
- * determine what will be returned.
+ *
* @param hazel hazel
+ * @param the implementation of {@link DistributedObject}
* @return the optional that may contain a {@link DistributedObject}
- * @param the implementation of {@link DistributedObject}
+ * @apiNote The implementation currently uses {@link #getAll()} and {@link java.util.function.Predicate}s to
+ * determine what will be returned.
*/
@ApiStatus.AvailableSince("1.6")
Optional get(@NotNull String hazel);
diff --git a/Master/dependency-reduced-pom.xml b/Master/dependency-reduced-pom.xml
index ba2c20f..e15127d 100644
--- a/Master/dependency-reduced-pom.xml
+++ b/Master/dependency-reduced-pom.xml
@@ -1,44 +1,45 @@
-
-
- JuliGamesCore
- net.juligames.core
- 1.6
-
- 4.0.0
- Master
-
-
-
- maven-shade-plugin
- 3.4.1
-
-
- package
-
- shade
-
-
-
-
-
-
- maven-jar-plugin
- 3.3.0
-
-
-
- true
- net.juligames.core.master.CoreMaster
-
-
-
-
-
-
-
- 17
- 17
- UTF-8
-
+
+
+ JuliGamesCore
+ net.juligames.core
+ 1.6
+
+ 4.0.0
+ Master
+
+
+
+ maven-shade-plugin
+ 3.4.1
+
+
+ package
+
+ shade
+
+
+
+
+
+
+ maven-jar-plugin
+ 3.3.0
+
+
+
+ true
+ net.juligames.core.master.CoreMaster
+
+
+
+
+
+
+
+ 17
+ 17
+ UTF-8
+
diff --git a/Master/src/main/java/net/juligames/core/master/cmd/PrintMapCommand.java b/Master/src/main/java/net/juligames/core/master/cmd/PrintMapCommand.java
index 8a7b7e9..849ac93 100644
--- a/Master/src/main/java/net/juligames/core/master/cmd/PrintMapCommand.java
+++ b/Master/src/main/java/net/juligames/core/master/cmd/PrintMapCommand.java
@@ -5,7 +5,6 @@
import de.bentzin.tools.logging.Logger;
import net.juligames.core.Core;
import net.juligames.core.api.TODO;
-import net.juligames.core.api.misc.APIUtils;
import org.jetbrains.annotations.NotNull;
import java.util.Optional;
@@ -13,7 +12,6 @@
import java.util.function.Predicate;
import static net.juligames.core.api.misc.APIUtils.executeAndReturnFirstSuccess;
-import static net.juligames.core.api.misc.APIUtils.executeAndSwallow;
/**
* @author Ture Bentzin
@@ -59,9 +57,9 @@ public void executeCommand(@NotNull String commandString) {
protected IMap findMap(String query) {
return (IMap) executeAndReturnFirstSuccess(
//Equal names
- () -> findMapHard(query,distributedObject -> distributedObject.getName().equals(query)),
+ () -> findMapHard(query, distributedObject -> distributedObject.getName().equals(query)),
//Semi Equal names
- () -> findMapHard(query,distributedObject -> distributedObject.getName().equalsIgnoreCase(query)),
+ () -> findMapHard(query, distributedObject -> distributedObject.getName().equalsIgnoreCase(query)),
//Starts with
() -> findMapHard(query, distributedObject -> distributedObject.getName().startsWith(query)),
//Starts with (semi)
@@ -83,6 +81,6 @@ protected IMap findMap(String query) {
if (optionalDistributedObject.isEmpty()) {
throw new IllegalArgumentException("cant find: " + name);
}
- return (IMap)optionalDistributedObject.get();
+ return (IMap) optionalDistributedObject.get();
}
}
diff --git a/Master/src/main/java/net/juligames/core/master/logging/MasterLogger.java b/Master/src/main/java/net/juligames/core/master/logging/MasterLogger.java
index 943c39d..70661d3 100644
--- a/Master/src/main/java/net/juligames/core/master/logging/MasterLogger.java
+++ b/Master/src/main/java/net/juligames/core/master/logging/MasterLogger.java
@@ -14,11 +14,6 @@
*/
public final class MasterLogger extends JavaLogger {
- @ApiStatus.AvailableSince("1.6")
- public static void setupJavaLogging() {
- System.setProperty("java.util.logging.SimpleFormatter.format", "[%1$tF %1$tT] [%4$-7s] %5$s %n");
- }
-
public static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern(" HH:mm:ss");
public MasterLogger(String name, @NotNull Logger parent, java.util.logging.@NotNull Logger logger) {
@@ -31,6 +26,11 @@ public MasterLogger(String name, java.util.logging.@NotNull Logger logger) {
logger.addHandler(LogFileHandlerManager.generateFileHandler());
}
+ @ApiStatus.AvailableSince("1.6")
+ public static void setupJavaLogging() {
+ System.setProperty("java.util.logging.SimpleFormatter.format", "[%1$tF %1$tT] [%4$-7s] %5$s %n");
+ }
+
@Override
public void log(String message, @NotNull LogLevel logLevel) {
super.log(timeAndDate(message), logLevel);
diff --git a/PaperAPI/src/main/java/net/juligames/core/paper/PaperConversationManager.java b/PaperAPI/src/main/java/net/juligames/core/paper/PaperConversationManager.java
index 890dc99..3028199 100644
--- a/PaperAPI/src/main/java/net/juligames/core/paper/PaperConversationManager.java
+++ b/PaperAPI/src/main/java/net/juligames/core/paper/PaperConversationManager.java
@@ -12,25 +12,25 @@
* 25.03.2023
*/
public class PaperConversationManager extends ConversationManager {
-
+
private static PaperConversationManager instance;
- public static PaperConversationManager getInstance() {
- return instance;
- }
-
public PaperConversationManager(@NotNull Map audienceConverserMap) {
super(audienceConverserMap);
- if(instance != null) {
+ if (instance != null) {
throw new IllegalStateException("instance is already present!");
}
instance = this;
}
public PaperConversationManager() {
- if(instance != null) {
+ if (instance != null) {
throw new IllegalStateException("instance is already present!");
}
instance = this;
}
+
+ public static PaperConversationManager getInstance() {
+ return instance;
+ }
}
\ No newline at end of file
diff --git a/PaperAPI/src/main/java/net/juligames/core/paper/PaperMessageRecipient.java b/PaperAPI/src/main/java/net/juligames/core/paper/PaperMessageRecipient.java
index a349e2c..011bf8e 100644
--- a/PaperAPI/src/main/java/net/juligames/core/paper/PaperMessageRecipient.java
+++ b/PaperAPI/src/main/java/net/juligames/core/paper/PaperMessageRecipient.java
@@ -12,6 +12,7 @@
/**
* Represents a message recipient on a Paper server, which is capable of receiving messages
* through the Bukkit {@link CommandSender} interface.
+ *
* @author Ture Bentzin
* 19.11.2022
*/
@@ -21,6 +22,7 @@ public class PaperMessageRecipient implements MessageRecipient {
/**
* Constructs a new {@code PaperMessageRecipient} with the specified {@link CommandSender}.
+ *
* @param commandSender the Bukkit {@link CommandSender} for this recipient
*/
public PaperMessageRecipient(CommandSender commandSender) {
@@ -29,6 +31,7 @@ public PaperMessageRecipient(CommandSender commandSender) {
/**
* Returns a human-readable name that defines this recipient.
+ *
* @return the name of this recipient, which is equivalent to the name of the Bukkit {@link CommandSender}
*/
@Override
@@ -38,6 +41,7 @@ public PaperMessageRecipient(CommandSender commandSender) {
/**
* Delivers a message to this recipient using the Adventure API.
+ *
* @param message the {@link Message} to be delivered
*/
@Override
@@ -47,6 +51,7 @@ public void deliver(@NotNull Message message) {
/**
* Delivers a miniMessage string to this recipient using the Adventure API.
+ *
* @param miniMessage the miniMessage to be delivered to the Bukkit {@link CommandSender}
*/
@Override
@@ -57,6 +62,7 @@ public void deliver(@NotNull String miniMessage) {
/**
* Returns the locale of the player associated with this recipient, if applicable.
+ *
* @return the locale string of the player, or {@code null} if the recipient is not a player
*/
@Override
diff --git a/PaperAPI/src/main/java/net/juligames/core/paper/inventory/InventoryConfigWriter.java b/PaperAPI/src/main/java/net/juligames/core/paper/inventory/InventoryConfigWriter.java
index c1cbaea..a35ba2c 100644
--- a/PaperAPI/src/main/java/net/juligames/core/paper/inventory/InventoryConfigWriter.java
+++ b/PaperAPI/src/main/java/net/juligames/core/paper/inventory/InventoryConfigWriter.java
@@ -31,8 +31,8 @@ public record InventoryConfigWriter(Inventory inventory) implements ConfigWriter
* Populates an inventory with items from the given configuration.
*
* @param configuration the configuration to read items from
- * @param keyspace the keyspace in the configuration to read items from
- * @param inventory the inventory to populate
+ * @param keyspace the keyspace in the configuration to read items from
+ * @param inventory the inventory to populate
*/
public static void populateInventory(@NotNull Configuration configuration, @NotNull String keyspace, @NotNull Inventory inventory) {
Collection collection = configuration.getCollection(keyspace, itemStackInterpreter);
@@ -44,8 +44,8 @@ public static void populateInventory(@NotNull Configuration configuration, @NotN
*
*
* @param configuration the configuration to read items from
- * @param keyspace the keyspace in the configuration to read items from
- * @param inventory the inventory to populate
+ * @param keyspace the keyspace in the configuration to read items from
+ * @param inventory the inventory to populate
* @return the populated inventory
*/
@ApiStatus.Experimental
@@ -59,7 +59,7 @@ public static void populateInventory(@NotNull Configuration configuration, @NotN
* Writes the inventory to the given configuration.
*
* @param configuration the configuration to write the inventory to
- * @param keyspace the keyspace in the configuration to write the inventory to
+ * @param keyspace the keyspace in the configuration to write the inventory to
*/
@Override
public void write(@NotNull Configuration configuration, @NotNull String keyspace) {
diff --git a/PaperAPI/src/main/java/net/juligames/core/paper/misc/configmapping/ObjectifiedConfiguration.java b/PaperAPI/src/main/java/net/juligames/core/paper/misc/configmapping/ObjectifiedConfiguration.java
index b554823..db80587 100644
--- a/PaperAPI/src/main/java/net/juligames/core/paper/misc/configmapping/ObjectifiedConfiguration.java
+++ b/PaperAPI/src/main/java/net/juligames/core/paper/misc/configmapping/ObjectifiedConfiguration.java
@@ -148,7 +148,6 @@ public ObjectifiedConfiguration(@NotNull Representation se
}
-
public final @NotNull ConfigurationSection getAssociatedSection() {
return associatedSection;
}
diff --git a/PaperAPI/src/main/java/net/juligames/core/paper/prompt/MaterialPrompt.java b/PaperAPI/src/main/java/net/juligames/core/paper/prompt/MaterialPrompt.java
index 0f7097d..ccec998 100644
--- a/PaperAPI/src/main/java/net/juligames/core/paper/prompt/MaterialPrompt.java
+++ b/PaperAPI/src/main/java/net/juligames/core/paper/prompt/MaterialPrompt.java
@@ -4,7 +4,6 @@
import de.bentzin.conversationlib.prompt.Prompt;
import de.bentzin.conversationlib.prompt.ValidatingPrompt;
import org.bukkit.Material;
-import org.bukkit.map.MapPalette;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
diff --git a/PaperCore/dependency-reduced-pom.xml b/PaperCore/dependency-reduced-pom.xml
index 5a4833a..7b5ba6d 100644
--- a/PaperCore/dependency-reduced-pom.xml
+++ b/PaperCore/dependency-reduced-pom.xml
@@ -1,54 +1,55 @@
-
-
- JuliGamesCore
- net.juligames.core
- 1.6
-
- 4.0.0
- PaperCore
-
-
-
- true
- src/main/resources
-
-
-
-
- maven-shade-plugin
- 3.4.1
-
-
- package
-
- shade
-
-
-
-
- false
-
-
-
-
-
-
- papermc
- https://repo.papermc.io/repository/maven-public/
-
-
-
-
- io.papermc.paper
- paper-api
- 1.18.2-R0.1-SNAPSHOT
- provided
-
-
-
- 17
- 17
- UTF-8
-
+
+
+ JuliGamesCore
+ net.juligames.core
+ 1.6
+
+ 4.0.0
+ PaperCore
+
+
+
+ true
+ src/main/resources
+
+
+
+
+ maven-shade-plugin
+ 3.4.1
+
+
+ package
+
+ shade
+
+
+
+
+ false
+
+
+
+
+
+
+ papermc
+ https://repo.papermc.io/repository/maven-public/
+
+
+
+
+ io.papermc.paper
+ paper-api
+ 1.18.2-R0.1-SNAPSHOT
+ provided
+
+
+
+ 17
+ 17
+ UTF-8
+
diff --git a/PaperCore/src/main/java/net/juligames/core/paper/PaperCorePlugin.java b/PaperCore/src/main/java/net/juligames/core/paper/PaperCorePlugin.java
index 3a4b8a1..a17952d 100644
--- a/PaperCore/src/main/java/net/juligames/core/paper/PaperCorePlugin.java
+++ b/PaperCore/src/main/java/net/juligames/core/paper/PaperCorePlugin.java
@@ -8,7 +8,6 @@
import net.juligames.core.api.jdbi.MessageDAO;
import net.juligames.core.api.minigame.BasicMiniGame;
import net.juligames.core.caching.MessageCaching;
-import net.juligames.core.command.CoreCommandNotificationListener;
import net.juligames.core.paper.bstats.Metrics;
import net.juligames.core.paper.conversation.ConversationListener;
import net.juligames.core.paper.events.ServerBootFinishedEvent;
diff --git a/PaperCore/src/main/java/net/juligames/core/paper/conversation/ConversationListener.java b/PaperCore/src/main/java/net/juligames/core/paper/conversation/ConversationListener.java
index 6a1a5f7..e3a44c9 100644
--- a/PaperCore/src/main/java/net/juligames/core/paper/conversation/ConversationListener.java
+++ b/PaperCore/src/main/java/net/juligames/core/paper/conversation/ConversationListener.java
@@ -1,7 +1,6 @@
package net.juligames.core.paper.conversation;
import net.juligames.core.Core;
-import net.juligames.core.api.API;
import net.juligames.core.paper.PaperConversationManager;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
@@ -28,7 +27,7 @@ public void onChat(@NotNull AsyncPlayerChatEvent event) {
@EventHandler
public void onCommand(@NotNull ServerCommandEvent serverCommandEvent) {
if (PaperConversationManager.getInstance().handleInput(serverCommandEvent.getSender(),
- serverCommandEvent.getCommand())){
+ serverCommandEvent.getCommand())) {
serverCommandEvent.setCancelled(true);
}
}
diff --git a/SuperCore/pom.xml b/SuperCore/pom.xml
index 0610287..853cac7 100644
--- a/SuperCore/pom.xml
+++ b/SuperCore/pom.xml
@@ -1,6 +1,6 @@
-
4.0.0
diff --git a/VelocityCore/dependency-reduced-pom.xml b/VelocityCore/dependency-reduced-pom.xml
index b4552eb..44cd80c 100644
--- a/VelocityCore/dependency-reduced-pom.xml
+++ b/VelocityCore/dependency-reduced-pom.xml
@@ -1,54 +1,55 @@
-
-
- JuliGamesCore
- net.juligames.core
- 1.6
-
- 4.0.0
- VelocityCore
-
-
-
- maven-shade-plugin
- 3.4.1
-
-
- package
-
- shade
-
-
-
-
- false
-
-
-
-
-
-
- papermc
- papermc
- https://repo.papermc.io/repository/maven-public/
-
-
- juligames-juligames
- Juligames Maven
- https://maven.juligames.net/juligames
-
-
-
-
- com.velocitypowered
- velocity-api
- 3.1.1
- provided
-
-
-
- 17
- 17
- UTF-8
-
+
+
+ JuliGamesCore
+ net.juligames.core
+ 1.6
+
+ 4.0.0
+ VelocityCore
+
+
+
+ maven-shade-plugin
+ 3.4.1
+
+
+ package
+
+ shade
+
+
+
+
+ false
+
+
+
+
+
+
+ papermc
+ papermc
+ https://repo.papermc.io/repository/maven-public/
+
+
+ juligames-juligames
+ Juligames Maven
+ https://maven.juligames.net/juligames
+
+
+
+
+ com.velocitypowered
+ velocity-api
+ 3.1.1
+ provided
+
+
+
+ 17
+ 17
+ UTF-8
+