Package com.chillycheesy.modulo.event
Class SignalEmitEvent
java.lang.Object
com.chillycheesy.modulo.events.Event
com.chillycheesy.modulo.event.SignalEmitEvent
Event emits when a signal is emitted.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSignalEmitEvent(Module signalEmitter, Module[] receptors, String signal, String[] args)Create a new SignalEmitEvent.SignalEmitEvent(Module signalEmitter, String signal, String[] args)Create a new SignalEmitEvent. -
Method Summary
Modifier and TypeMethodDescriptionbooleanString[]getArgs()Getter for the arguments.Module[]Getter for the receptor.Getter for the signal.Getter for the signal emitter.booleanCheck if the signal was receive.voidSetter for the arguments.voidsetReceptors(Module[] receptors)Setter for the receptors module.voidSetter for the signal.voidsetSignalEmitter(Module signalEmitter)Setter for the emitter module.Methods inherited from class com.chillycheesy.modulo.events.Event
getEmitter, setEmitter
-
Constructor Details
-
SignalEmitEvent
Create a new SignalEmitEvent. -
SignalEmitEvent
Create a new SignalEmitEvent.- Parameters:
signalEmitter- TheModulethat emits the signal.signal- The signal name that has been emitted.args- The args of the signal. By calling this constructor, the receptors will be an empty array.
-
-
Method Details
-
haveReceptors
public boolean haveReceptors()Check if the signal was receive.- Returns:
- True if at least one
Modulehas catch the signal.
-
setSignalEmitter
Setter for the emitter module.- Parameters:
signalEmitter- The new signal emitter.
-
setReceptors
Setter for the receptors module.- Parameters:
receptors- The new receptors.
-
getSignalEmitter
Getter for the signal emitter.- Returns:
- The signal emitter.
-
setSignal
Setter for the signal.- Parameters:
signal- The signal.
-
setArgs
Setter for the arguments.- Parameters:
args- The arguments.
-
getReceptor
Getter for the receptor.- Returns:
- The receptor.
-
getSignal
Getter for the signal.- Returns:
- The signal.
-
getArgs
Getter for the arguments.- Returns:
- The arguments.
-
equals
-