Class AbstractGameEvent
java.lang.Object
tk.airshipcraft.commonlib.calendar.impl.AbstractGameEvent
- All Implemented Interfaces:
IGameEvent
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:
- 2024-01-04
- Version:
- 1.0.0
- Author:
- notzune
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractGameEvent
(Optional<String> command, Optional<String> message) Creates a new AbstractGameEvent with the specified command and message. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Creates a new AbstractGameEvent with the specified message.protected void
Creates a new AbstractGameEvent with the specified command.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface tk.airshipcraft.commonlib.calendar.IGameEvent
trigger
-
Constructor Details
-
AbstractGameEvent
Creates a new AbstractGameEvent with the specified command and message.- Parameters:
command
- The command to execute when the event is triggered.message
- The message to broadcast when the event is triggered.
-
-
Method Details
-
executeCommand
protected void executeCommand()Creates a new AbstractGameEvent with the specified command. -
broadcastMessage
protected void broadcastMessage()Creates a new AbstractGameEvent with the specified message.
-