diff --git a/pom.xml b/pom.xml index 1cb21e65..ee9d3cf3 100644 --- a/pom.xml +++ b/pom.xml @@ -23,12 +23,6 @@ - - - spigotmc - https://hub.spigotmc.org/nexus/content/repositories/snapshots/ - - codemc-repo @@ -42,7 +36,7 @@ https://repo.extendedclip.com/content/repositories/placeholderapi/ - + papermc https://repo.papermc.io/repository/maven-public/ @@ -56,13 +50,20 @@ - + - org.spigotmc - spigot-api - 1.16.5-R0.1-SNAPSHOT + io.papermc.paper + paper-api + 1.18.2-R0.1-SNAPSHOT provided + + + com.github.seeseemelk + MockBukkit-v1.18 + 2.85.2 + test + io.javalin @@ -134,6 +135,11 @@ 2.0.9 + + org.apache.logging.log4j + log4j-api + 2.20.0 + org.apache.logging.log4j log4j-core @@ -191,7 +197,6 @@ ${maven.compiler.target} - org.apache.maven.plugins maven-release-plugin diff --git a/src/main/java/io/servertap/utils/ServerExecCommandSender.java b/src/main/java/io/servertap/utils/ServerExecCommandSender.java index 6aef4de5..41e41012 100644 --- a/src/main/java/io/servertap/utils/ServerExecCommandSender.java +++ b/src/main/java/io/servertap/utils/ServerExecCommandSender.java @@ -2,12 +2,15 @@ import io.servertap.Constants; import io.servertap.ServerTapMain; +import net.kyori.adventure.text.Component; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Server; import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; import org.bukkit.command.RemoteConsoleCommandSender; +import org.bukkit.conversations.Conversation; +import org.bukkit.conversations.ConversationAbandonedEvent; import org.bukkit.permissions.Permission; import org.bukkit.permissions.PermissionAttachment; import org.bukkit.permissions.PermissionAttachmentInfo; @@ -15,14 +18,18 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.io.IOException; import java.lang.reflect.InvocationTargetException; +import java.net.InetAddress; +import java.net.ServerSocket; +import java.net.SocketAddress; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.UUID; import java.util.concurrent.*; -public class ServerExecCommandSender implements RemoteConsoleCommandSender { +public class ServerExecCommandSender implements ConsoleCommandSender { private static final ScheduledThreadPoolExecutor EXECUTOR = new ScheduledThreadPoolExecutor(1); private static final ConsoleCommandSender CONSOLE_COMMAND_SENDER = Bukkit.getConsoleSender(); @@ -149,6 +156,31 @@ public Server getServer() { return CONSOLE_COMMAND_SENDER.getServer(); } + @Override + public boolean isConversing() { + return CONSOLE_COMMAND_SENDER.isConversing(); + } + + @Override + public void acceptConversationInput(@NotNull String input) { + CONSOLE_COMMAND_SENDER.acceptConversationInput(input); + } + + @Override + public boolean beginConversation(@NotNull Conversation conversation) { + return CONSOLE_COMMAND_SENDER.beginConversation(conversation); + } + + @Override + public void abandonConversation(@NotNull Conversation conversation) { + CONSOLE_COMMAND_SENDER.abandonConversation(conversation); + } + + @Override + public void abandonConversation(@NotNull Conversation conversation, @NotNull ConversationAbandonedEvent details) { + CONSOLE_COMMAND_SENDER.abandonConversation(conversation, details); + } + public void sendRawMessage(String raw) { CONSOLE_COMMAND_SENDER.sendRawMessage(raw); } @@ -168,4 +200,8 @@ public CommandSender.Spigot spigot() { } } + @Override + public @NotNull Component name() { + return CONSOLE_COMMAND_SENDER.name(); + } } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index ffa0cac1..b126a4e7 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -2,7 +2,7 @@ name: ServerTap main: io.servertap.ServerTapMain version: 0.5.4-SNAPSHOT description: ServerTap is a REST API for Bukkit/Spigot/PaperMC Minecraft servers. -authors: [phybros, ATechAdventurer, c1oneman, Earlh21, Scarsz, au5ton, Aberdeener, Hedlund01, matteoturini, Diddyy, Velyn-N, srmullaney] +authors: [phybros, ATechAdventurer, c1oneman, Earlh21, Scarsz, au5ton, Aberdeener, Hedlund01, matteoturini, Diddyy, Velyn-N, srmullaney, TimeCoding] load: STARTUP website: https://servertap.io api-version: 1.16