Class AFKCancelConditions

java.lang.Object
xyz.vdeltagabriel.afk.condition.AFKCancelConditions

public class AFKCancelConditions extends Object
Manager class for cancel conditions. Other mod creators can register their own custom conditions, see MovementCancelCondition for example implementation.
Since:
1.0.0
  • Constructor Details

    • AFKCancelConditions

      public AFKCancelConditions()
  • Method Details

    • register

      public static void register(AFKCancelCondition condition)
      Register an AFKCancelCondition
      Parameters:
      condition -
    • fulfilled

      public static boolean fulfilled(net.minecraft.server.level.ServerPlayer player)
      Check if any of the cancel conditions are fulfilled for the player to be considered not AFK
      Parameters:
      player - Player to check
      Returns:
      Whether any of the conditions are fulfilled