From 92dfa32d071072f8ecb87445eaf9a613843c5903 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Wed, 2 Mar 2022 12:22:37 +0000 Subject: [PATCH] CustomGoal inheritance fixes --- .../java/com/willfp/eco/core/entities/ai/CustomGoal.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/eco-api/src/main/java/com/willfp/eco/core/entities/ai/CustomGoal.java b/eco-api/src/main/java/com/willfp/eco/core/entities/ai/CustomGoal.java index b995fcbe..420b2601 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/entities/ai/CustomGoal.java +++ b/eco-api/src/main/java/com/willfp/eco/core/entities/ai/CustomGoal.java @@ -56,4 +56,11 @@ public interface CustomGoal extends EntityGoal, TargetGoal default void stop() { // Override when needed. } + + @Override + default T addToEntity(@NotNull T entity, int priority) { + throw new UnsupportedOperationException( + "Shorthand syntax is not supported for custom goals by default as they can be both entity and target goals." + ); + } }