From c10ec7d664ae3ace9a7d67fd8a7714e4b11cdf8c Mon Sep 17 00:00:00 2001 From: APickledWalrus Date: Sat, 23 Jul 2022 18:10:34 -0400 Subject: [PATCH] Refactoring and branch updates --- build.gradle | 4 +- src/main/java/ch/njol/skript/Skript.java | 7 +-- .../njol/skript/classes/data/JavaClasses.java | 2 +- .../ch/njol/skript/command/ScriptCommand.java | 2 +- .../chat/expressions/ExprPrefixSuffix.java | 3 +- .../ch/njol/skript/lang/VariableString.java | 4 +- src/main/java/ch/njol/skript/util/Utils.java | 5 +- .../skript/variables/FlatFileStorage.java | 3 +- .../skript/bukkit/chat/ChatModule.java} | 56 +++++++++---------- .../bukkit}/chat/elements/EffBroadcast.java | 4 +- .../bukkit}/chat/elements/EffMessage.java | 5 +- .../bukkit}/chat/elements/EffSendTitle.java | 5 +- .../bukkit}/chat/elements/ExprColoured.java | 4 +- .../bukkit/chat/elements}/package-info.java | 2 +- .../skript/bukkit}/chat/package-info.java | 2 +- .../bukkit}/chat/util/CodeConverter.java | 2 +- .../bukkit}/chat/util/ComponentHandler.java | 3 +- .../bukkit/chat/util}/package-info.java | 2 +- 18 files changed, 56 insertions(+), 59 deletions(-) rename src/main/java/{io/skriptlang/skript/chat/ChatRegistration.java => org/skriptlang/skript/bukkit/chat/ChatModule.java} (60%) rename src/main/java/{io/skriptlang/skript => org/skriptlang/skript/bukkit}/chat/elements/EffBroadcast.java (96%) rename src/main/java/{io/skriptlang/skript => org/skriptlang/skript/bukkit}/chat/elements/EffMessage.java (96%) rename src/main/java/{io/skriptlang/skript => org/skriptlang/skript/bukkit}/chat/elements/EffSendTitle.java (96%) rename src/main/java/{io/skriptlang/skript => org/skriptlang/skript/bukkit}/chat/elements/ExprColoured.java (97%) rename src/main/java/{io/skriptlang/skript/chat/util => org/skriptlang/skript/bukkit/chat/elements}/package-info.java (94%) rename src/main/java/{io/skriptlang/skript => org/skriptlang/skript/bukkit}/chat/package-info.java (95%) rename src/main/java/{io/skriptlang/skript => org/skriptlang/skript/bukkit}/chat/util/CodeConverter.java (97%) rename src/main/java/{io/skriptlang/skript => org/skriptlang/skript/bukkit}/chat/util/ComponentHandler.java (99%) rename src/main/java/{io/skriptlang/skript/chat/elements => org/skriptlang/skript/bukkit/chat/util}/package-info.java (95%) diff --git a/build.gradle b/build.gradle index 854b82b33df..b5ce7ed1b8f 100644 --- a/build.gradle +++ b/build.gradle @@ -26,8 +26,8 @@ dependencies { shadow group: 'org.bstats', name: 'bstats-bukkit', version: '3.0.0' implementation group: 'io.papermc.paper', name: 'paper-api', version: '1.19-R0.1-SNAPSHOT' shadow group: 'net.kyori', name: 'adventure-text-minimessage', version: '4.11.0-SNAPSHOT' - shadow group: 'net.kyori', name: 'adventure-platform-bukkit', version: '4.1.0-SNAPSHOT' - shadow group: 'net.kyori', name: 'adventure-text-serializer-plain', version: '4.10.0-SNAPSHOT' + shadow group: 'net.kyori', name: 'adventure-platform-bukkit', version: '4.1.1-SNAPSHOT' + shadow group: 'net.kyori', name: 'adventure-text-serializer-plain', version: '4.11.0-SNAPSHOT' implementation group: 'org.eclipse.jdt', name: 'org.eclipse.jdt.annotation', version: '2.2.600' implementation group: 'com.google.code.findbugs', name: 'findbugs', version: '3.0.1' implementation group: 'com.sk89q.worldguard', name: 'worldguard-legacy', version: '7.0.0-SNAPSHOT' diff --git a/src/main/java/ch/njol/skript/Skript.java b/src/main/java/ch/njol/skript/Skript.java index f495522b134..3d0f634dbbf 100644 --- a/src/main/java/ch/njol/skript/Skript.java +++ b/src/main/java/ch/njol/skript/Skript.java @@ -53,8 +53,8 @@ import java.util.zip.ZipFile; import ch.njol.skript.lang.Section; -import io.skriptlang.skript.chat.ChatRegistration; -import io.skriptlang.skript.chat.util.ComponentHandler; +import org.skriptlang.skript.bukkit.chat.ChatModule; +import org.skriptlang.skript.bukkit.chat.util.ComponentHandler; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; import org.bstats.bukkit.Metrics; @@ -102,7 +102,6 @@ import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.ExpressionInfo; import ch.njol.skript.lang.ExpressionType; -import ch.njol.skript.lang.Section; import ch.njol.skript.lang.SkriptEvent; import ch.njol.skript.lang.SkriptEventInfo; import ch.njol.skript.lang.Statement; @@ -510,7 +509,7 @@ public void onEnable() { try { getAddonInstance().loadClasses("ch.njol.skript", "conditions", "effects", "events", "expressions", "entity", "sections"); - new ChatRegistration().register(getAddonInstance()); // TODO remove eventually + new ChatModule().register(getAddonInstance()); // TODO remove eventually } catch (final Exception e) { exception(e, "Could not load required .class files: " + e.getLocalizedMessage()); setEnabled(false); diff --git a/src/main/java/ch/njol/skript/classes/data/JavaClasses.java b/src/main/java/ch/njol/skript/classes/data/JavaClasses.java index f79c908324d..407328fa944 100644 --- a/src/main/java/ch/njol/skript/classes/data/JavaClasses.java +++ b/src/main/java/ch/njol/skript/classes/data/JavaClasses.java @@ -31,7 +31,7 @@ import ch.njol.skript.registrations.Classes; import ch.njol.util.StringUtils; import ch.njol.yggdrasil.Fields; -import io.skriptlang.skript.chat.util.ComponentHandler; +import org.skriptlang.skript.bukkit.chat.util.ComponentHandler; import org.eclipse.jdt.annotation.Nullable; import java.util.regex.Pattern; diff --git a/src/main/java/ch/njol/skript/command/ScriptCommand.java b/src/main/java/ch/njol/skript/command/ScriptCommand.java index c0eece87791..15b823a1f3e 100644 --- a/src/main/java/ch/njol/skript/command/ScriptCommand.java +++ b/src/main/java/ch/njol/skript/command/ScriptCommand.java @@ -33,7 +33,7 @@ import java.util.Set; import java.util.UUID; -import io.skriptlang.skript.chat.util.ComponentHandler; +import org.skriptlang.skript.bukkit.chat.util.ComponentHandler; import net.kyori.adventure.text.Component; import org.bukkit.Bukkit; import org.bukkit.ChatColor; diff --git a/src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java b/src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java index d837fba887b..da8244f85a1 100644 --- a/src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java +++ b/src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java @@ -18,7 +18,7 @@ */ package ch.njol.skript.hooks.chat.expressions; -import io.skriptlang.skript.chat.util.ComponentHandler; +import org.skriptlang.skript.bukkit.chat.util.ComponentHandler; import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.eclipse.jdt.annotation.Nullable; @@ -32,7 +32,6 @@ import ch.njol.skript.hooks.VaultHook; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.SkriptParser.ParseResult; -import ch.njol.skript.util.Utils; import ch.njol.util.Kleenean; /** diff --git a/src/main/java/ch/njol/skript/lang/VariableString.java b/src/main/java/ch/njol/skript/lang/VariableString.java index 5ed431e11d5..7ec46e7e3bd 100644 --- a/src/main/java/ch/njol/skript/lang/VariableString.java +++ b/src/main/java/ch/njol/skript/lang/VariableString.java @@ -33,8 +33,8 @@ import ch.njol.util.StringUtils; import ch.njol.util.coll.CollectionUtils; import ch.njol.util.coll.iterator.SingleItemIterator; -import io.skriptlang.skript.chat.elements.ExprColoured; -import io.skriptlang.skript.chat.util.ComponentHandler; +import org.skriptlang.skript.bukkit.chat.elements.ExprColoured; +import org.skriptlang.skript.bukkit.chat.util.ComponentHandler; import net.kyori.adventure.text.Component; import org.bukkit.event.Event; import org.eclipse.jdt.annotation.Nullable; diff --git a/src/main/java/ch/njol/skript/util/Utils.java b/src/main/java/ch/njol/skript/util/Utils.java index b99cdb6ce45..ee33c9e14c2 100644 --- a/src/main/java/ch/njol/skript/util/Utils.java +++ b/src/main/java/ch/njol/skript/util/Utils.java @@ -52,6 +52,7 @@ import ch.njol.util.StringUtils; import ch.njol.util.coll.CollectionUtils; import net.md_5.bungee.api.ChatColor; +import org.skriptlang.skript.bukkit.chat.util.ComponentHandler; /** * Utility class. @@ -481,7 +482,7 @@ public static String getChatStyle(final String s) { * * @param message * @return message with localised chat styles converted to Minecraft's format - * @deprecated Use {@link io.skriptlang.skript.chat.util.ComponentHandler#toLegacyString(String)} + * @deprecated Use {@link ComponentHandler#toLegacyString(String)} */ @Deprecated public static String replaceChatStyles(final String message) { @@ -521,7 +522,7 @@ public String run(final Matcher m) { * * @param message * @return message with english chat styles converted to Minecraft's format - * @deprecated Use {@link io.skriptlang.skript.chat.util.ComponentHandler#toLegacyString(String)} + * @deprecated Use {@link ComponentHandler#toLegacyString(String)} */ public static String replaceEnglishChatStyles(final String message) { if (message.isEmpty()) diff --git a/src/main/java/ch/njol/skript/variables/FlatFileStorage.java b/src/main/java/ch/njol/skript/variables/FlatFileStorage.java index da128e04f84..9b6a0077779 100644 --- a/src/main/java/ch/njol/skript/variables/FlatFileStorage.java +++ b/src/main/java/ch/njol/skript/variables/FlatFileStorage.java @@ -34,7 +34,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import io.skriptlang.skript.chat.util.ComponentHandler; +import org.skriptlang.skript.bukkit.chat.util.ComponentHandler; import org.eclipse.jdt.annotation.Nullable; import ch.njol.skript.Skript; @@ -45,7 +45,6 @@ import ch.njol.skript.util.ExceptionUtils; import ch.njol.skript.util.FileUtils; import ch.njol.skript.util.Task; -import ch.njol.skript.util.Utils; import ch.njol.skript.util.Version; import ch.njol.util.NotifyingReference; diff --git a/src/main/java/io/skriptlang/skript/chat/ChatRegistration.java b/src/main/java/org/skriptlang/skript/bukkit/chat/ChatModule.java similarity index 60% rename from src/main/java/io/skriptlang/skript/chat/ChatRegistration.java rename to src/main/java/org/skriptlang/skript/bukkit/chat/ChatModule.java index 1b49d774c53..81f0dc6031c 100644 --- a/src/main/java/io/skriptlang/skript/chat/ChatRegistration.java +++ b/src/main/java/org/skriptlang/skript/bukkit/chat/ChatModule.java @@ -16,7 +16,7 @@ * * Copyright Peter Güttinger, SkriptLang team and contributors */ -package io.skriptlang.skript.chat; +package org.skriptlang.skript.bukkit.chat; import ch.njol.skript.SkriptAddon; import ch.njol.skript.classes.ClassInfo; @@ -24,19 +24,15 @@ import ch.njol.skript.lang.ParseContext; import ch.njol.skript.registrations.Classes; import ch.njol.skript.registrations.Converters; -import io.skriptlang.skript.chat.util.ComponentHandler; +import org.skriptlang.skript.bukkit.chat.util.ComponentHandler; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.minimessage.tag.Tag; -import net.kyori.adventure.text.minimessage.tag.Tag.Argument; import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver; import org.apache.commons.lang.StringEscapeUtils; import java.io.IOException; -import java.nio.charset.StandardCharsets; -import static io.skriptlang.skript.chat.util.ComponentHandler.registerPlaceholder; - -public class ChatRegistration { +public class ChatModule { public void register(SkriptAddon addon) { @@ -74,41 +70,41 @@ public String toVariableNameString(Component component) { // Just to initialize it now ComponentHandler.getAdventure(); - registerPlaceholder("dark_cyan", ""); - registerPlaceholder("dark_turquoise", ""); - registerPlaceholder("cyan", ""); + ComponentHandler.registerPlaceholder("dark_cyan", ""); + ComponentHandler.registerPlaceholder("dark_turquoise", ""); + ComponentHandler.registerPlaceholder("cyan", ""); - registerPlaceholder("purple", ""); + ComponentHandler.registerPlaceholder("purple", ""); - registerPlaceholder("dark_yellow", ""); - registerPlaceholder("orange", ""); + ComponentHandler.registerPlaceholder("dark_yellow", ""); + ComponentHandler.registerPlaceholder("orange", ""); - registerPlaceholder("light_grey", ""); - registerPlaceholder("light_gray", ""); - registerPlaceholder("silver", ""); + ComponentHandler.registerPlaceholder("light_grey", ""); + ComponentHandler.registerPlaceholder("light_gray", ""); + ComponentHandler.registerPlaceholder("silver", ""); - registerPlaceholder("dark_silver", ""); + ComponentHandler.registerPlaceholder("dark_silver", ""); - registerPlaceholder("light_blue", ""); - registerPlaceholder("indigo", ""); + ComponentHandler.registerPlaceholder("light_blue", ""); + ComponentHandler.registerPlaceholder("indigo", ""); - registerPlaceholder("light_green", ""); - registerPlaceholder("lime_green", ""); - registerPlaceholder("lime", ""); + ComponentHandler.registerPlaceholder("light_green", ""); + ComponentHandler.registerPlaceholder("lime_green", ""); + ComponentHandler.registerPlaceholder("lime", ""); - registerPlaceholder("light_cyan", ""); - registerPlaceholder("light_aqua", ""); - registerPlaceholder("turquoise", ""); + ComponentHandler.registerPlaceholder("light_cyan", ""); + ComponentHandler.registerPlaceholder("light_aqua", ""); + ComponentHandler.registerPlaceholder("turquoise", ""); - registerPlaceholder("light_red", ""); + ComponentHandler.registerPlaceholder("light_red", ""); - registerPlaceholder("pink", ""); - registerPlaceholder("magenta", ""); + ComponentHandler.registerPlaceholder("pink", ""); + ComponentHandler.registerPlaceholder("magenta", ""); - registerPlaceholder("light_yellow", ""); + ComponentHandler.registerPlaceholder("light_yellow", ""); - registerPlaceholder("underline", ""); + ComponentHandler.registerPlaceholder("underline", ""); ComponentHandler.registerResolver(TagResolver.resolver("unicode", (argumentQueue, context) -> { String unicode = argumentQueue.popOr("A unicode tag must have an argument of the unicode").value(); diff --git a/src/main/java/io/skriptlang/skript/chat/elements/EffBroadcast.java b/src/main/java/org/skriptlang/skript/bukkit/chat/elements/EffBroadcast.java similarity index 96% rename from src/main/java/io/skriptlang/skript/chat/elements/EffBroadcast.java rename to src/main/java/org/skriptlang/skript/bukkit/chat/elements/EffBroadcast.java index 6fea3a3e663..48453dba1f5 100644 --- a/src/main/java/io/skriptlang/skript/chat/elements/EffBroadcast.java +++ b/src/main/java/org/skriptlang/skript/bukkit/chat/elements/EffBroadcast.java @@ -16,7 +16,7 @@ * * Copyright Peter Güttinger, SkriptLang team and contributors */ -package io.skriptlang.skript.chat.elements; +package org.skriptlang.skript.bukkit.chat.elements; import ch.njol.skript.Skript; import ch.njol.skript.doc.Description; @@ -29,7 +29,7 @@ import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.skript.util.LiteralUtils; import ch.njol.util.Kleenean; -import io.skriptlang.skript.chat.util.ComponentHandler; +import org.skriptlang.skript.bukkit.chat.util.ComponentHandler; import net.kyori.adventure.audience.Audience; import org.bukkit.Bukkit; import org.bukkit.World; diff --git a/src/main/java/io/skriptlang/skript/chat/elements/EffMessage.java b/src/main/java/org/skriptlang/skript/bukkit/chat/elements/EffMessage.java similarity index 96% rename from src/main/java/io/skriptlang/skript/chat/elements/EffMessage.java rename to src/main/java/org/skriptlang/skript/bukkit/chat/elements/EffMessage.java index 8ff0811a01c..8162a047bfa 100644 --- a/src/main/java/io/skriptlang/skript/chat/elements/EffMessage.java +++ b/src/main/java/org/skriptlang/skript/bukkit/chat/elements/EffMessage.java @@ -16,7 +16,7 @@ * * Copyright Peter Güttinger, SkriptLang team and contributors */ -package io.skriptlang.skript.chat.elements; +package org.skriptlang.skript.bukkit.chat.elements; import ch.njol.skript.Skript; import ch.njol.skript.doc.Description; @@ -30,7 +30,7 @@ import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.skript.util.LiteralUtils; import ch.njol.util.Kleenean; -import io.skriptlang.skript.chat.util.ComponentHandler; +import org.skriptlang.skript.bukkit.chat.util.ComponentHandler; import net.kyori.adventure.audience.Audience; import net.kyori.adventure.identity.Identity; import net.kyori.adventure.text.Component; @@ -61,6 +61,7 @@ }) @RequiredPlugins("Minecraft 1.16.4+ for optional sender") @Since("1.0, 2.2-dev26 (advanced features), 2.5.2 (optional sender), 2.6 (sending objects)") +// See what might need taken from https://github.com/SkriptLang/Skript/pull/4545 public class EffMessage extends Effect { static { diff --git a/src/main/java/io/skriptlang/skript/chat/elements/EffSendTitle.java b/src/main/java/org/skriptlang/skript/bukkit/chat/elements/EffSendTitle.java similarity index 96% rename from src/main/java/io/skriptlang/skript/chat/elements/EffSendTitle.java rename to src/main/java/org/skriptlang/skript/bukkit/chat/elements/EffSendTitle.java index 1501a045c2f..fecd73c6d41 100644 --- a/src/main/java/io/skriptlang/skript/chat/elements/EffSendTitle.java +++ b/src/main/java/org/skriptlang/skript/bukkit/chat/elements/EffSendTitle.java @@ -16,7 +16,7 @@ * * Copyright Peter Güttinger, SkriptLang team and contributors */ -package io.skriptlang.skript.chat.elements; +package org.skriptlang.skript.bukkit.chat.elements; import ch.njol.skript.Skript; import ch.njol.skript.doc.Description; @@ -28,7 +28,7 @@ import ch.njol.skript.lang.SkriptParser.ParseResult; import ch.njol.skript.util.Timespan; import ch.njol.util.Kleenean; -import io.skriptlang.skript.chat.util.ComponentHandler; +import org.skriptlang.skript.bukkit.chat.util.ComponentHandler; import net.kyori.adventure.audience.Audience; import net.kyori.adventure.title.Title; import net.kyori.adventure.title.Title.Times; @@ -52,6 +52,7 @@ "send subtitle \"Party!\" to all players" }) @Since("2.3, INSERT VERSION (sending objects)") +// TODO see what might need taken from https://github.com/SkriptLang/Skript/pull/4362 public class EffSendTitle extends Effect { static { diff --git a/src/main/java/io/skriptlang/skript/chat/elements/ExprColoured.java b/src/main/java/org/skriptlang/skript/bukkit/chat/elements/ExprColoured.java similarity index 97% rename from src/main/java/io/skriptlang/skript/chat/elements/ExprColoured.java rename to src/main/java/org/skriptlang/skript/bukkit/chat/elements/ExprColoured.java index faeb81acebc..8a76721ec37 100644 --- a/src/main/java/io/skriptlang/skript/chat/elements/ExprColoured.java +++ b/src/main/java/org/skriptlang/skript/bukkit/chat/elements/ExprColoured.java @@ -16,7 +16,7 @@ * * Copyright Peter Güttinger, SkriptLang team and contributors */ -package io.skriptlang.skript.chat.elements; +package org.skriptlang.skript.bukkit.chat.elements; import ch.njol.skript.Skript; import ch.njol.skript.doc.Description; @@ -30,7 +30,7 @@ import ch.njol.skript.lang.VariableString; import ch.njol.skript.lang.util.SimpleExpression; import ch.njol.util.Kleenean; -import io.skriptlang.skript.chat.util.ComponentHandler; +import org.skriptlang.skript.bukkit.chat.util.ComponentHandler; import net.kyori.adventure.text.Component; import org.bukkit.event.Event; import org.eclipse.jdt.annotation.Nullable; diff --git a/src/main/java/io/skriptlang/skript/chat/util/package-info.java b/src/main/java/org/skriptlang/skript/bukkit/chat/elements/package-info.java similarity index 94% rename from src/main/java/io/skriptlang/skript/chat/util/package-info.java rename to src/main/java/org/skriptlang/skript/bukkit/chat/elements/package-info.java index 0829fafa717..d05865be9d6 100644 --- a/src/main/java/io/skriptlang/skript/chat/util/package-info.java +++ b/src/main/java/org/skriptlang/skript/bukkit/chat/elements/package-info.java @@ -17,7 +17,7 @@ * Copyright Peter Güttinger, SkriptLang team and contributors */ @NonNullByDefault({DefaultLocation.PARAMETER, DefaultLocation.RETURN_TYPE, DefaultLocation.FIELD}) -package io.skriptlang.skript.chat.util; +package org.skriptlang.skript.bukkit.chat.elements; import org.eclipse.jdt.annotation.DefaultLocation; import org.eclipse.jdt.annotation.NonNullByDefault; diff --git a/src/main/java/io/skriptlang/skript/chat/package-info.java b/src/main/java/org/skriptlang/skript/bukkit/chat/package-info.java similarity index 95% rename from src/main/java/io/skriptlang/skript/chat/package-info.java rename to src/main/java/org/skriptlang/skript/bukkit/chat/package-info.java index 132155a8421..09d974c28f3 100644 --- a/src/main/java/io/skriptlang/skript/chat/package-info.java +++ b/src/main/java/org/skriptlang/skript/bukkit/chat/package-info.java @@ -17,7 +17,7 @@ * Copyright Peter Güttinger, SkriptLang team and contributors */ @NonNullByDefault({DefaultLocation.PARAMETER, DefaultLocation.RETURN_TYPE, DefaultLocation.FIELD}) -package io.skriptlang.skript.chat; +package org.skriptlang.skript.bukkit.chat; import org.eclipse.jdt.annotation.DefaultLocation; import org.eclipse.jdt.annotation.NonNullByDefault; diff --git a/src/main/java/io/skriptlang/skript/chat/util/CodeConverter.java b/src/main/java/org/skriptlang/skript/bukkit/chat/util/CodeConverter.java similarity index 97% rename from src/main/java/io/skriptlang/skript/chat/util/CodeConverter.java rename to src/main/java/org/skriptlang/skript/bukkit/chat/util/CodeConverter.java index 9c35296a312..d78897b440b 100644 --- a/src/main/java/io/skriptlang/skript/chat/util/CodeConverter.java +++ b/src/main/java/org/skriptlang/skript/bukkit/chat/util/CodeConverter.java @@ -16,7 +16,7 @@ * * Copyright Peter Güttinger, SkriptLang team and contributors */ -package io.skriptlang.skript.chat.util; +package org.skriptlang.skript.bukkit.chat.util; import org.eclipse.jdt.annotation.Nullable; diff --git a/src/main/java/io/skriptlang/skript/chat/util/ComponentHandler.java b/src/main/java/org/skriptlang/skript/bukkit/chat/util/ComponentHandler.java similarity index 99% rename from src/main/java/io/skriptlang/skript/chat/util/ComponentHandler.java rename to src/main/java/org/skriptlang/skript/bukkit/chat/util/ComponentHandler.java index fbf91be48bb..ca46b795d90 100644 --- a/src/main/java/io/skriptlang/skript/chat/util/ComponentHandler.java +++ b/src/main/java/org/skriptlang/skript/bukkit/chat/util/ComponentHandler.java @@ -16,7 +16,7 @@ * * Copyright Peter Güttinger, SkriptLang team and contributors */ -package io.skriptlang.skript.chat.util; +package org.skriptlang.skript.bukkit.chat.util; import ch.njol.skript.Skript; import ch.njol.skript.lang.Expression; @@ -318,6 +318,7 @@ public static String toLegacyString(Component component) { public static BukkitAudiences getAdventure() { if (adventure == null) adventure = BukkitAudiences.create(Skript.getInstance()); + // TODO we might need to close this ('adventure.close()') return adventure; } diff --git a/src/main/java/io/skriptlang/skript/chat/elements/package-info.java b/src/main/java/org/skriptlang/skript/bukkit/chat/util/package-info.java similarity index 95% rename from src/main/java/io/skriptlang/skript/chat/elements/package-info.java rename to src/main/java/org/skriptlang/skript/bukkit/chat/util/package-info.java index 1106edbf370..605ab1b7c18 100644 --- a/src/main/java/io/skriptlang/skript/chat/elements/package-info.java +++ b/src/main/java/org/skriptlang/skript/bukkit/chat/util/package-info.java @@ -17,7 +17,7 @@ * Copyright Peter Güttinger, SkriptLang team and contributors */ @NonNullByDefault({DefaultLocation.PARAMETER, DefaultLocation.RETURN_TYPE, DefaultLocation.FIELD}) -package io.skriptlang.skript.chat.elements; +package org.skriptlang.skript.bukkit.chat.util; import org.eclipse.jdt.annotation.DefaultLocation; import org.eclipse.jdt.annotation.NonNullByDefault;