31 lines
754 B
Java
31 lines
754 B
Java
|
package envoy.client.data.commands;
|
||
|
|
||
|
import java.util.function.Supplier;
|
||
|
|
||
|
/**
|
||
|
* This interface defines an action that should be performed when a system
|
||
|
* command gets called.
|
||
|
*
|
||
|
* @author Leon Hofmeister
|
||
|
* @since Envoy Client v0.2-beta
|
||
|
*/
|
||
|
public interface OnCall {
|
||
|
|
||
|
/**
|
||
|
* Performs class specific actions when a {@link SystemCommand} has been called.
|
||
|
*
|
||
|
* @since Envoy Client v0.2-beta
|
||
|
*/
|
||
|
void onCall();
|
||
|
|
||
|
/**
|
||
|
* Performs actions that can only be performed by classes that are not
|
||
|
* {@link SystemCommand}s when a SystemCommand has been called.
|
||
|
*
|
||
|
* @param consumer the action to perform when this {@link SystemCommand} has
|
||
|
* been called
|
||
|
* @since Envoy Client v0.2-beta
|
||
|
*/
|
||
|
void onCall(Supplier<Void> consumer);
|
||
|
}
|