From 32f6355c8c7fc1611140bfcce6afe8b25cea5697 Mon Sep 17 00:00:00 2001 From: Luck Date: Mon, 13 May 2019 10:57:06 +0100 Subject: Activity log improvements --- .../me/lucko/spark/bungeecord/BungeeCordCommandSender.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'spark-bungeecord/src/main/java/me/lucko') diff --git a/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/BungeeCordCommandSender.java b/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/BungeeCordCommandSender.java index d3a831c..193b38a 100644 --- a/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/BungeeCordCommandSender.java +++ b/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/BungeeCordCommandSender.java @@ -23,6 +23,9 @@ package me.lucko.spark.bungeecord; import me.lucko.spark.common.CommandSender; import net.kyori.text.Component; import net.kyori.text.adapter.bungeecord.TextAdapter; +import net.md_5.bungee.api.connection.ProxiedPlayer; + +import java.util.UUID; public class BungeeCordCommandSender implements CommandSender { private final net.md_5.bungee.api.CommandSender sender; @@ -36,6 +39,14 @@ public class BungeeCordCommandSender implements CommandSender { return this.sender.getName(); } + @Override + public UUID getUniqueId() { + if (this.sender instanceof ProxiedPlayer) { + return ((ProxiedPlayer) this.sender).getUniqueId(); + } + return null; + } + @Override public void sendMessage(Component message) { TextAdapter.sendComponent(this.sender, message); -- cgit