Package net.risingworld.api.callbacks
Schnittstelle Callback<T>
- Typparameter:
T
- the callback result type. Depends on the function you're calling.
public interface Callback<T>
A callback. In some cases certain functions have to query the results from the
client first, so it's not possible to return the result immediately. For these
situations, you have to use callbacks: You can override the
Every callback has a certain return type, i.e an object that will be passed to the
onCall()
method and put your code there. Once the server receives the results from the player,
the onCall()
method of this callback will be called.Every callback has a certain return type, i.e an object that will be passed to the
onCall()
method. Usually this is the actual result of the original
function call.-
Methodenübersicht
-
Methodendetails
-
onCall
This method will be called once the server received the results from the client. The actual result will be passed as parameter.- Parameter:
result
- the actual result the server received from the client.
-