reformat spigot package

This commit is contained in:
Lulu13022002
2024-12-16 19:22:36 +01:00
parent 7d29c678f7
commit 57c683647f
11 changed files with 559 additions and 1376 deletions

View File

@@ -2,17 +2,14 @@ package org.spigotmc;
import net.minecraft.server.MinecraftServer;
public class AsyncCatcher
{
public class AsyncCatcher {
public static boolean enabled = true;
public static void catchOp(String reason)
{
if ( AsyncCatcher.enabled && Thread.currentThread() != MinecraftServer.getServer().serverThread )
{
MinecraftServer.LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); // Paper
throw new IllegalStateException( "Asynchronous " + reason + "!" );
public static void catchOp(String reason) {
if (AsyncCatcher.enabled && Thread.currentThread() != MinecraftServer.getServer().serverThread) {
MinecraftServer.LOGGER.error("Thread {} failed main thread check: {}", Thread.currentThread().getName(), reason, new Throwable()); // Paper
throw new IllegalStateException("Asynchronous " + reason + "!");
}
}
}