From 3c12a31ead109c11af7290d13e87651cff796b6c Mon Sep 17 00:00:00 2001 From: Luck Date: Fri, 9 Jul 2021 13:34:58 +0100 Subject: Fix Sponge API 8 platform build config --- .../java/me/lucko/spark/sponge/Sponge8CommandSender.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'spark-sponge8/src/main/java/me/lucko') diff --git a/spark-sponge8/src/main/java/me/lucko/spark/sponge/Sponge8CommandSender.java b/spark-sponge8/src/main/java/me/lucko/spark/sponge/Sponge8CommandSender.java index 60a4b8f..5e7a65a 100644 --- a/spark-sponge8/src/main/java/me/lucko/spark/sponge/Sponge8CommandSender.java +++ b/spark-sponge8/src/main/java/me/lucko/spark/sponge/Sponge8CommandSender.java @@ -79,4 +79,17 @@ public class Sponge8CommandSender extends AbstractCommandSender { public boolean hasPermission(String permission) { return super.delegate.hasPermission(permission); } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Sponge8CommandSender that = (Sponge8CommandSender) o; + return this.getUniqueId().equals(that.getUniqueId()); + } + + @Override + public int hashCode() { + return getUniqueId().hashCode(); + } } -- cgit