Package nl.pim16aap2.animatedarchitecture.spigot.core.events
Events are fired using Bukkit's Event system. This means that creating listeners for these
events is done in the same way as for any other Bukkit event.
@org.bukkit.event.EventHandler(ignoreCancelled = true)
public void onStructureCreation(StructurePrepareCreateEvent event)
{
// Do something here when a structure is about to be created.
}
Some events have two versions: One that has "prepare" in the name and one that does not. The "prepare" version is fired before the action is performed and can be used to cancel the action. The non-"prepare" version is fired after the action has been performed and cannot be cancelled.
This is done mostly for situations where even if the "prepare" event is not cancelled, the action may still fail. For example, if a structure is about to be toggled, but some step in the process fails, the structure will not be toggled. In this case, the "prepare" event will not be cancelled, the structure will not be toggled, and the non-"prepare" event will not be fired.
Another example is situations where the action requires interaction with the database. The non-"prepare" event will only be fired if both allowed by the "prepare" event and if the database interaction was successful.
-
ClassesClassDescriptionRepresents an implementation of
IAnimatedArchitectureEventCallerfor the Spigot platform.Represents an event that is part of the AnimatedArchitectureSpigot event system.Represents the event where a structure was created.Implementation ofIStructureEventToggleEndfor the Spigot platform.Implementation ofIStructureEventTogglePreparefor the Spigot platform.Implementation ofIStructureEventToggleStartfor the Spigot platform.Represents the event where a new owner is added to a structure.Represents the event where a structure will be created.Represents the event where a structure was deleted.Represents the event where a structure will be (un)locked.Represents the event where an owner is removed from a structure.