diff options
author | Luck <git@lucko.me> | 2019-05-13 10:57:06 +0100 |
---|---|---|
committer | Luck <git@lucko.me> | 2019-05-13 10:57:06 +0100 |
commit | 32f6355c8c7fc1611140bfcce6afe8b25cea5697 (patch) | |
tree | d2f87081d98f312ff46ba734c104ff730c848d4f /spark-bungeecord/src/main/java/me/lucko | |
parent | cf3ce4d9d7c443e0051eb7cff7dc71cf2a0eb851 (diff) | |
download | spark-32f6355c8c7fc1611140bfcce6afe8b25cea5697.tar.gz spark-32f6355c8c7fc1611140bfcce6afe8b25cea5697.tar.bz2 spark-32f6355c8c7fc1611140bfcce6afe8b25cea5697.zip |
Activity log improvements
Diffstat (limited to 'spark-bungeecord/src/main/java/me/lucko')
-rw-r--r-- | spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/BungeeCordCommandSender.java | 11 |
1 files changed, 11 insertions, 0 deletions
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; @@ -37,6 +40,14 @@ public class BungeeCordCommandSender implements CommandSender { } @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); } |