Class DelayedCommandInputManager
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.managers.DelayedCommandInputManager
- All Implemented Interfaces:
IDebuggable
Represents a manager for outstanding
DelayedCommandInputRequests for BaseCommands.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelAll(ICommandSender commandSender) Deregisters and cancels all registeredDelayedCommandInputRequests for anICommandSender.voidderegister(ICommandSender commandSender, DelayedCommandInputRequest<?> delayedCommandInputRequest) Deregisters a registeredDelayedCommandInputRequestfor anICommandSenderif the registered input request 1) exists and 2) is the same (reference equality) as the provided input request.voidderegisterAll(ICommandSender commandSender) Deregisters all registeredDelayedCommandInputRequests for anICommandSender.@Nullable StringGets the debug information for this object.getInputRequest(ICommandSender commandSender) Gets theDelayedCommandInputRequestregistered for a command sender if one exists.voidregister(ICommandSender commandSender, DelayedCommandInputRequest<?> inputRequest) Registers an input request for a command sender.
-
Constructor Details
-
DelayedCommandInputManager
-
-
Method Details
-
register
Registers an input request for a command sender.- Parameters:
commandSender- TheICommandSenderfor which to register the input request.inputRequest- TheDelayedCommandInputRequestto register.
-
deregisterAll
Deregisters all registeredDelayedCommandInputRequests for anICommandSender.- Parameters:
commandSender- TheICommandSenderfor which to deregister the input requests.
-
cancelAll
Deregisters and cancels all registeredDelayedCommandInputRequests for anICommandSender.- Parameters:
commandSender- TheICommandSenderfor which to deregister the input requests.
-
deregister
public void deregister(ICommandSender commandSender, DelayedCommandInputRequest<?> delayedCommandInputRequest) Deregisters a registeredDelayedCommandInputRequestfor anICommandSenderif the registered input request 1) exists and 2) is the same (reference equality) as the provided input request.This method is useful if the goal is to remove the exact request and not any new requests that may have overridden it.
- Parameters:
commandSender- TheICommandSenderfor which to deregister the input request.delayedCommandInputRequest- TheDelayedCommandInputRequestinstance to compare any registered requests to. If the reference of the registered request and this one are the same, it will be deregistered.
-
getInputRequest
Gets theDelayedCommandInputRequestregistered for a command sender if one exists.- Parameters:
commandSender- TheICommandSenderfor which to retrieve the input request.- Returns:
- The
DelayedCommandInputRequestregistered for a command sender, if one is registered.
-
getDebugInformation
Description copied from interface:IDebuggableGets the debug information for this object.- Specified by:
getDebugInformationin interfaceIDebuggable- Returns:
- The debug information or null if there's nothing to log at this time.
-