Class EventManager
java.lang.Object
tk.airshipcraft.commonlib.calendar.impl.EventManager
- All Implemented Interfaces:
IEventManager
The EventManager class is responsible for managing and scheduling in-game events in the Minecraft world. It allows for the creation, scheduling, and triggering of events based on in-game dates, providing a dynamic gameplay experience that changes with the calendar.
The AbstractGameEvent abstract class provides a structure for creating different types of in-game events. Subclasses of AbstractGameEvent can define specific behaviors in their trigger method
- Since:
- 2023-12-27
- Version:
- 1.0.0
- Author:
- notzune
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
scheduleEvent
(CustomDate date, AbstractGameEvent event) Schedules an event to occur on a specific in-game date.void
triggerEvents
(CustomDate currentDate) Triggers all events scheduled for the current in-game date.
-
Constructor Details
-
EventManager
public EventManager()Initializes a new EventManager. Creates a new empty map to hold scheduled events.
-
-
Method Details
-
scheduleEvent
Schedules an event to occur on a specific in-game date.- Specified by:
scheduleEvent
in interfaceIEventManager
- Parameters:
date
- The date on which the event should occur.event
- The event to be scheduled.
-
triggerEvents
Triggers all events scheduled for the current in-game date.- Specified by:
triggerEvents
in interfaceIEventManager
- Parameters:
currentDate
- The current in-game date.
-