16 lines
538 B
Java
16 lines
538 B
Java
package org.spigotmc;
|
|
|
|
import net.minecraft.server.MinecraftServer;
|
|
|
|
public class AsyncCatcher {
|
|
|
|
public static boolean enabled = true;
|
|
|
|
public static void catchOp(String reason) {
|
|
if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThread()) { // Paper - chunk system
|
|
MinecraftServer.LOGGER.error("Thread {} failed main thread check: {}", Thread.currentThread().getName(), reason, new Throwable()); // Paper
|
|
throw new IllegalStateException("Asynchronous " + reason + "!");
|
|
}
|
|
}
|
|
}
|