PendingMatch

public final class PendingMatch

The time between a player asking for a match and its space being ready, such as a world copy or generation. The roster is marked as taken, so nobody can double-request or join elsewhere. The request is cancelled if a member quits, on timeout, or by the plugin, and each cancel runs the plugin's cleanup so only what this request created is deleted.

Types

Link copied to clipboard
public enum CancelReason

Properties

Link copied to clipboard
public final List<Player> roster

Functions

Link copied to clipboard
public void cancel()
Link copied to clipboard
Opens the match and admits the roster.
Link copied to clipboard
public List<Player> getRoster()
Link copied to clipboard
public boolean isActive()
Link copied to clipboard
public void onCancel(Consumer<PendingMatch.CancelReason> cleanup)
Cleanup for what the plugin built for this request.
Link copied to clipboard
public static PendingMatch request(Collection<? extends Player> roster, long timeoutTicks)
Returns null when the roster is empty, or any member is offline or already taken by any plugin.