Package xyz.vdeltagabriel.afk.condition
Class AFKCancelConditions
java.lang.Object
xyz.vdeltagabriel.afk.condition.AFKCancelConditions
Manager class for cancel conditions.
Other mod creators can register their own custom conditions,
see
MovementCancelCondition for example implementation.- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanfulfilled(net.minecraft.server.level.ServerPlayer player) Check if any of the cancel conditions are fulfilled for the player to be considered not AFKstatic voidregister(AFKCancelCondition condition) Register anAFKCancelCondition
-
Constructor Details
-
AFKCancelConditions
public AFKCancelConditions()
-
-
Method Details
-
register
Register anAFKCancelCondition- 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
-