aboutsummaryrefslogtreecommitdiff
path: root/spark-forge/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'spark-forge/src/main/java')
-rw-r--r--spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java
index 87d394b..b5afd32 100644
--- a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java
+++ b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandSender.java
@@ -26,7 +26,8 @@ import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
import net.minecraft.command.ICommandSource;
import net.minecraft.entity.player.PlayerEntity;
-import net.minecraft.network.rcon.IServer;
+import net.minecraft.network.rcon.RConConsoleSource;
+import net.minecraft.server.MinecraftServer;
import net.minecraft.util.Util;
import net.minecraft.util.text.IFormattableTextComponent;
import net.minecraft.util.text.ITextComponent;
@@ -45,8 +46,10 @@ public class ForgeCommandSender extends AbstractCommandSender<ICommandSource> {
public String getName() {
if (super.delegate instanceof PlayerEntity) {
return ((PlayerEntity) super.delegate).getGameProfile().getName();
- } else if (super.delegate instanceof IServer) {
+ } else if (super.delegate instanceof MinecraftServer) {
return "Console";
+ } else if (super.delegate instanceof RConConsoleSource) {
+ return "RCON Console";
} else {
return "unknown:" + super.delegate.getClass().getSimpleName();
}