Class NestingLimiter

java.lang.Object
com.viaversion.viaversion.util.NestingLimiter

public final class NestingLimiter extends Object
  • Constructor Details

    • NestingLimiter

      public NestingLimiter()
  • Method Details

    • setMaxDepth

      public static int setMaxDepth(int maxDepth)
      Sets the max depth for reads on the current thread.
      Parameters:
      maxDepth - max depth, or -1 for no limit
      Returns:
      the previous max depth, to be set again once done
    • increment

      public static void increment()
    • decrement

      public static void decrement()