Package me.totalfreedom.event
Class EventBus
java.lang.Object
me.totalfreedom.service.Service
me.totalfreedom.event.EventBus
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid<T extends FEvent>
T<T extends FEvent>
EventSubscription<T>voidtick()This method is called every single tick, or at least, every tick interval described by the holdingServiceSubscription.voidunsubscribe(EventSubscription<?> subscription)
-
Constructor Details
-
EventBus
-
-
Method Details
-
addEvent
-
getEvent
-
subscribe
-
unsubscribe
-
getCommonsBase
-
tick
public void tick()Description copied from class:ServiceThis method is called every single tick, or at least, every tick interval described by the holdingServiceSubscription. Since this runs every single tick, the body of this method should not have a complexity higher than 5. This includes Cyclomatic, Cognitive, and NPath complexities. If the service is asynchronous, there is a bit more flexibility with the complexity rating, extending to no more than 10. However, it's generally good practice to keep the complexity of ticking services as low as possible to avoid extensive resource consumption.
-