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;