Skip to content

Commit

Permalink
Add support for rcon console command senders (#5261)
Browse files Browse the repository at this point in the history
RemoteConsoleCommandSender does not inherit ConsoleCommandSender, so we gotta handle it explicitly.
  • Loading branch information
AlexProgrammerDE authored Jan 4, 2025
1 parent 623ec2b commit f1ed841
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
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;
Expand Down Expand Up @@ -76,7 +77,7 @@ public Object handle() {

@Override
public boolean isConsole() {
return handle instanceof ConsoleCommandSender;
return handle instanceof ConsoleCommandSender || handle instanceof RemoteConsoleCommandSender;
}

@Override
Expand Down

0 comments on commit f1ed841

Please sign in to comment.