Class NoClientAcknowledgement
java.lang.Object
com.pixelmonmod.pixelmon.api.battles.animation.schedule.acknowledge.NoClientAcknowledgement
- All Implemented Interfaces:
ClientAcknowledgementState
Acknowledgement state used when no client acknowledgement is required.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledge(UUID playerId, UUID acknowledgementId) Handles an acknowledgement received from a client.voidcomplete()Marks acknowledgement as complete.config()Returns the acknowledgement configuration that created this state.id()Returns the acknowledgement id clients must echo back.booleanReturns whether all required clients have acknowledged.booleanReturns whether this state is waiting on clients.booleanReturns whether this acknowledgement has timed out.voidtick()Advances timeout tracking by one tick.Returns the clients that have not acknowledged yet.
-
Field Details
-
INSTANCE
-
-
Method Details
-
isPending
public boolean isPending()Description copied from interface:ClientAcknowledgementStateReturns whether this state is waiting on clients.- Specified by:
isPendingin interfaceClientAcknowledgementState- Returns:
truewhile acknowledgement is pending
-
id
Description copied from interface:ClientAcknowledgementStateReturns the acknowledgement id clients must echo back.- Specified by:
idin interfaceClientAcknowledgementState- Returns:
- the acknowledgement id
-
config
Description copied from interface:ClientAcknowledgementStateReturns the acknowledgement configuration that created this state.- Specified by:
configin interfaceClientAcknowledgementState- Returns:
- the acknowledgement configuration
-
waitingFor
Description copied from interface:ClientAcknowledgementStateReturns the clients that have not acknowledged yet.- Specified by:
waitingForin interfaceClientAcknowledgementState- Returns:
- the waiting player ids
-
tick
public void tick()Description copied from interface:ClientAcknowledgementStateAdvances timeout tracking by one tick.- Specified by:
tickin interfaceClientAcknowledgementState
-
acknowledge
Description copied from interface:ClientAcknowledgementStateHandles an acknowledgement received from a client.- Specified by:
acknowledgein interfaceClientAcknowledgementState- Parameters:
playerId- the acknowledging playeracknowledgementId- the acknowledgement id sent by the client
-
isComplete
public boolean isComplete()Description copied from interface:ClientAcknowledgementStateReturns whether all required clients have acknowledged.- Specified by:
isCompletein interfaceClientAcknowledgementState- Returns:
truewhen acknowledgement is complete
-
isTimedOut
public boolean isTimedOut()Description copied from interface:ClientAcknowledgementStateReturns whether this acknowledgement has timed out.- Specified by:
isTimedOutin interfaceClientAcknowledgementState- Returns:
truewhen the configured timeout has elapsed
-
complete
public void complete()Description copied from interface:ClientAcknowledgementStateMarks acknowledgement as complete.- Specified by:
completein interfaceClientAcknowledgementState
-