1
0
mirror of https://github.com/Suiranoil/SkinRestorer.git synced 2026-01-16 04:42:12 +00:00

better display invalid provider error

This commit is contained in:
2024-07-02 00:44:01 +03:00
parent dd3c5ac58d
commit 8f20c6a68a

View File

@@ -120,7 +120,7 @@ public final class SkinRestorer {
)
.thenApplyAsync(result -> {
if (result.isEmpty())
throw new IllegalArgumentException("provider " + context.name() + " is not registered");
return Result.<Collection<ServerPlayer>, String>error("provider '" + context.name() + "' is not registered");
var skinResult = result.get();
if (skinResult.isError())