Class AnimatedArchitectureEventFactorySpigot
java.lang.Object
nl.pim16aap2.animatedarchitecture.spigot.core.implementations.AnimatedArchitectureEventFactorySpigot
- All Implemented Interfaces:
IAnimatedArchitectureEventFactory
@Singleton
public class AnimatedArchitectureEventFactorySpigot
extends Object
implements IAnimatedArchitectureEventFactory
The implementation of
IAnimatedArchitectureEventFactory for the Spigot platform.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreatePrepareDeleteStructureEvent(Structure structure, @Nullable IPlayer responsible) Constructs a newIStructurePrepareDeleteEvent.createPrepareStructureCreateEvent(Structure structure, @Nullable IPlayer responsible) Constructs a newIStructurePrepareCreateEvent.createStructureCreatedEvent(Structure preview, @Nullable IPlayer responsible) Constructs a newIStructureCreatedEvent.createStructurePrepareAddOwnerEvent(Structure structure, StructureOwner newOwner, @Nullable IPlayer responsible) Constructs a newIStructurePrepareAddOwnerEvent.createStructurePrepareLockChangeEvent(Structure structure, boolean newLockStatus, @Nullable IPlayer responsible) Constructs a newIStructurePrepareLockChangeEvent.createStructurePrepareRemoveOwnerEvent(Structure structure, StructureOwner removedOwner, @Nullable IPlayer responsible) Constructs a newIStructurePrepareRemoveOwnerEvent.createToggleEndEvent(Structure structure, StructureSnapshot snapshot, StructureActionCause cause, StructureActionType actionType, IPlayer responsible, double time, boolean skipAnimation) Constructs aIStructureEventToggleEnd.createTogglePrepareEvent(StructureSnapshot snapshot, StructureActionCause cause, StructureActionType actionType, IPlayer responsible, double time, boolean skipAnimation, Cuboid newCuboid) Constructs aIStructureEventTogglePrepare.createToggleStartEvent(Structure structure, StructureSnapshot structureSnapshot, StructureActionCause cause, StructureActionType actionType, IPlayer responsible, double time, boolean skipAnimation, Cuboid newCuboid) Constructs aIStructureEventToggleStart.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nl.pim16aap2.animatedarchitecture.core.api.factories.IAnimatedArchitectureEventFactory
createPrepareDeleteStructureEvent, createPrepareStructureCreateEvent, createStructureCreatedEvent, createStructurePrepareAddOwnerEvent, createStructurePrepareLockChangeEvent, createStructurePrepareRemoveOwnerEvent
-
Constructor Details
-
AnimatedArchitectureEventFactorySpigot
@Inject public AnimatedArchitectureEventFactorySpigot()
-
-
Method Details
-
createStructureCreatedEvent
public IStructureCreatedEvent createStructureCreatedEvent(Structure preview, @Nullable @Nullable IPlayer responsible) Description copied from interface:IAnimatedArchitectureEventFactoryConstructs a newIStructureCreatedEvent.- Specified by:
createStructureCreatedEventin interfaceIAnimatedArchitectureEventFactory- Parameters:
preview- The preview of the structure that is to be created.responsible- TheIPlayerresponsible for the action, if a player was responsible for it.
-
createPrepareStructureCreateEvent
public IStructurePrepareCreateEvent createPrepareStructureCreateEvent(Structure structure, @Nullable @Nullable IPlayer responsible) Description copied from interface:IAnimatedArchitectureEventFactoryConstructs a newIStructurePrepareCreateEvent.- Specified by:
createPrepareStructureCreateEventin interfaceIAnimatedArchitectureEventFactory- Parameters:
structure- The structure that was created.responsible- TheIPlayerresponsible for the action, if a player was responsible for it.
-
createPrepareDeleteStructureEvent
public IStructurePrepareDeleteEvent createPrepareDeleteStructureEvent(Structure structure, @Nullable @Nullable IPlayer responsible) Description copied from interface:IAnimatedArchitectureEventFactoryConstructs a newIStructurePrepareDeleteEvent.- Specified by:
createPrepareDeleteStructureEventin interfaceIAnimatedArchitectureEventFactory- Parameters:
structure- TheStructurethat will be deleted.responsible- TheIPlayerresponsible for the action, if a player was responsible for it.
-
createStructurePrepareAddOwnerEvent
public IStructurePrepareAddOwnerEvent createStructurePrepareAddOwnerEvent(Structure structure, StructureOwner newOwner, @Nullable @Nullable IPlayer responsible) Description copied from interface:IAnimatedArchitectureEventFactoryConstructs a newIStructurePrepareAddOwnerEvent.- Specified by:
createStructurePrepareAddOwnerEventin interfaceIAnimatedArchitectureEventFactory- Parameters:
structure- The structure to which a new owner is to be added.newOwner- The newStructureOwnerthat is to be added to the structure.responsible- TheIPlayerresponsible for the action, if a player was responsible for it.
-
createStructurePrepareRemoveOwnerEvent
public IStructurePrepareRemoveOwnerEvent createStructurePrepareRemoveOwnerEvent(Structure structure, StructureOwner removedOwner, @Nullable @Nullable IPlayer responsible) Description copied from interface:IAnimatedArchitectureEventFactoryConstructs a newIStructurePrepareRemoveOwnerEvent.- Specified by:
createStructurePrepareRemoveOwnerEventin interfaceIAnimatedArchitectureEventFactory- Parameters:
structure- The structure from which an owner will be removed.removedOwner- TheStructureOwnerthat is to be removed from the structure.responsible- TheIPlayerresponsible for the action, if a player was responsible for it.
-
createStructurePrepareLockChangeEvent
public IStructurePrepareLockChangeEvent createStructurePrepareLockChangeEvent(Structure structure, boolean newLockStatus, @Nullable @Nullable IPlayer responsible) Description copied from interface:IAnimatedArchitectureEventFactoryConstructs a newIStructurePrepareLockChangeEvent.- Specified by:
createStructurePrepareLockChangeEventin interfaceIAnimatedArchitectureEventFactory- Parameters:
structure- The structure to which the lock status is to be changednewLockStatus- The new locked status of the structure.responsible- TheIPlayerresponsible for the action, if a player was responsible for it.
-
createTogglePrepareEvent
public IStructureEventTogglePrepare createTogglePrepareEvent(StructureSnapshot snapshot, StructureActionCause cause, StructureActionType actionType, IPlayer responsible, double time, boolean skipAnimation, Cuboid newCuboid) Description copied from interface:IAnimatedArchitectureEventFactoryConstructs aIStructureEventTogglePrepare.- Specified by:
createTogglePrepareEventin interfaceIAnimatedArchitectureEventFactory- Parameters:
snapshot- The snapshot of the structure.cause- What caused the action.actionType- The type of action.responsible- Who is responsible for this structure. Either the player who directly toggled it (via a command or the GUI), or the original creator when this data is not available.time- The number of seconds the structure will take to open. Note that there are other factors that affect the total time as well.skipAnimation- If true, the structure will skip the animation and open instantly.newCuboid- TheCuboidrepresenting the area the structure will take up after the toggle.
-
createToggleStartEvent
public IStructureEventToggleStart createToggleStartEvent(Structure structure, StructureSnapshot structureSnapshot, StructureActionCause cause, StructureActionType actionType, IPlayer responsible, double time, boolean skipAnimation, Cuboid newCuboid) Description copied from interface:IAnimatedArchitectureEventFactoryConstructs aIStructureEventToggleStart.- Specified by:
createToggleStartEventin interfaceIAnimatedArchitectureEventFactory- Parameters:
structure- The structure itself.structureSnapshot- A snapshot of the structure created at the time the toggle action was requested.cause- What caused the action.actionType- The type of action.responsible- Who is responsible for this structure. Either the player who directly toggled it (via a command or the GUI), or the original creator when this data is not available.time- The number of seconds the structure will take to open. Note that there are other factors that affect the total time as well.skipAnimation- If true, the structure will skip the animation and open instantly.newCuboid- TheCuboidrepresenting the area the structure will take up after the toggle.
-
createToggleEndEvent
public IStructureEventToggleEnd createToggleEndEvent(Structure structure, StructureSnapshot snapshot, StructureActionCause cause, StructureActionType actionType, IPlayer responsible, double time, boolean skipAnimation) Description copied from interface:IAnimatedArchitectureEventFactoryConstructs aIStructureEventToggleEnd.- Specified by:
createToggleEndEventin interfaceIAnimatedArchitectureEventFactory- Parameters:
structure- The structure.snapshot- A snapshot of the structure created when the structure was preparing to toggle.cause- What caused the action.actionType- The type of action.responsible- Who is responsible for this structure. Either the player who directly toggled it (via a command or the GUI), or the original creator when this data is not available.time- The number of seconds the structure will take to open. Note that there are other factors that affect the total time as well.skipAnimation- If true, the structure will skip the animation and open instantly.
-