Skip to content

Commit c2b4b58

Browse files
Throw IllegalState- instead of IllegalArgumentException in ThreadCheck
1 parent 72e3735 commit c2b4b58

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

invui/src/main/java/xyz/xenondevs/invui/internal/util/ThreadCheck.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static void checkOwnedBy(Entity entity) {
1111
if (Bukkit.isOwnedByCurrentRegion(entity))
1212
return;
1313

14-
throw new IllegalArgumentException(
14+
throw new IllegalStateException(
1515
"A method was called from an incorrect thread. On Paper the correct thread is the server thread. " +
1616
"On Folia, the correct thread is the thread that owns the viewer (use the viewer's entity scheduler). " +
1717
"Note that the absence of this exception does not imply correctness. In general and unless otherwise documented, " +

0 commit comments

Comments
 (0)