Class StoragePreconditions

java.lang.Object
net.fabricmc.fabric.api.transfer.v1.storage.StoragePreconditions

public final class StoragePreconditions extends Object
  • Method Details

    • notBlank

      public static void notBlank(TransferVariant<?> variant)
      Ensure that the passed transfer variant is not blank.
      Throws:
      IllegalArgumentException - If the variant is blank.
    • notNegative

      public static void notNegative(long amount)
      Ensure that the passed amount is not negative. That is, it must be >= 0.
      Throws:
      IllegalArgumentException - If the amount is negative.
    • notBlankNotNegative

      public static void notBlankNotNegative(TransferVariant<?> variant, long amount)
      Check both for a not blank transfer variant and a not negative amount.