All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.spigotmc.AsyncCatcher Maven / Gradle / Ivy

The newest version!
package org.spigotmc;

import net.minecraft.server.MinecraftServer;

public class AsyncCatcher {

  public static boolean enabled = true;

  public static void catchOp(String reason) {
    if (enabled && Thread.currentThread() != MinecraftServer.getServer().primaryThread) {
      throw new IllegalStateException("Asynchronous " + reason + "!");
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy