From f1ed841e079d33fc1244123e3102dbd967aa502a Mon Sep 17 00:00:00 2001 From: Alex <40795980+AlexProgrammerDE@users.noreply.github.com> Date: Sat, 4 Jan 2025 14:28:54 +0100 Subject: [PATCH] Add support for rcon console command senders (#5261) RemoteConsoleCommandSender does not inherit ConsoleCommandSender, so we gotta handle it explicitly. --- .../geyser/platform/spigot/command/SpigotCommandSource.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/command/SpigotCommandSource.java b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/command/SpigotCommandSource.java index c1fb837c2..9f897b095 100644 --- a/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/command/SpigotCommandSource.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/command/SpigotCommandSource.java @@ -29,6 +29,7 @@ import net.kyori.adventure.text.Component; import net.kyori.adventure.text.serializer.bungeecord.BungeeComponentSerializer; import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; +import org.bukkit.command.RemoteConsoleCommandSender; import org.bukkit.entity.Player; import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; @@ -76,7 +77,7 @@ public class SpigotCommandSource implements GeyserCommandSource { @Override public boolean isConsole() { - return handle instanceof ConsoleCommandSender; + return handle instanceof ConsoleCommandSender || handle instanceof RemoteConsoleCommandSender; } @Override