aboutsummaryrefslogtreecommitdiff
path: root/spark-sponge
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2019-05-13 10:57:06 +0100
committerLuck <git@lucko.me>2019-05-13 10:57:06 +0100
commit32f6355c8c7fc1611140bfcce6afe8b25cea5697 (patch)
treed2f87081d98f312ff46ba734c104ff730c848d4f /spark-sponge
parentcf3ce4d9d7c443e0051eb7cff7dc71cf2a0eb851 (diff)
downloadspark-32f6355c8c7fc1611140bfcce6afe8b25cea5697.tar.gz
spark-32f6355c8c7fc1611140bfcce6afe8b25cea5697.tar.bz2
spark-32f6355c8c7fc1611140bfcce6afe8b25cea5697.zip
Activity log improvements
Diffstat (limited to 'spark-sponge')
-rw-r--r--spark-sponge/src/main/java/me/lucko/spark/sponge/SpongeCommandSender.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/spark-sponge/src/main/java/me/lucko/spark/sponge/SpongeCommandSender.java b/spark-sponge/src/main/java/me/lucko/spark/sponge/SpongeCommandSender.java
index 5b434fc..6f2c3a2 100644
--- a/spark-sponge/src/main/java/me/lucko/spark/sponge/SpongeCommandSender.java
+++ b/spark-sponge/src/main/java/me/lucko/spark/sponge/SpongeCommandSender.java
@@ -24,6 +24,9 @@ import me.lucko.spark.common.CommandSender;
import net.kyori.text.Component;
import net.kyori.text.adapter.spongeapi.TextAdapter;
import org.spongepowered.api.command.CommandSource;
+import org.spongepowered.api.entity.living.player.Player;
+
+import java.util.UUID;
public class SpongeCommandSender implements CommandSender {
private final CommandSource source;
@@ -38,6 +41,14 @@ public class SpongeCommandSender implements CommandSender {
}
@Override
+ public UUID getUniqueId() {
+ if (this.source instanceof Player) {
+ return ((Player) this.source).getUniqueId();
+ }
+ return null;
+ }
+
+ @Override
public void sendMessage(Component message) {
TextAdapter.sendComponent(this.source, message);
}