From 56119b39b45214a68c1cd8b49e7df95d0bf09dc1 Mon Sep 17 00:00:00 2001 From: _tud <98935832+UnderscoreTud@users.noreply.github.com> Date: Tue, 20 Aug 2024 23:11:01 +0300 Subject: [PATCH] Fix EffReturn error message (#6983) --- src/main/java/ch/njol/skript/effects/EffReturn.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/ch/njol/skript/effects/EffReturn.java b/src/main/java/ch/njol/skript/effects/EffReturn.java index 7c4025b5d7a..ba56ae3e875 100644 --- a/src/main/java/ch/njol/skript/effects/EffReturn.java +++ b/src/main/java/ch/njol/skript/effects/EffReturn.java @@ -96,7 +96,8 @@ public boolean init(Expression[] exprs, int matchedPattern, Kleenean isDelaye } if (handler.isSingleReturnValue() && !convertedExpr.isSingle()) { - Skript.error(handler + " is defined to only return a single " + returnType + ", but this return statement can return multiple values."); + String typeName = Classes.getSuperClassInfo(returnType).getName().getSingular(); + Skript.error(handler + " is defined to only return a single " + typeName + ", but this return statement can return multiple values."); return false; } value = convertedExpr;