Interface Callback<T>

Type Parameters:
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 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.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onCall(T result)
    This method will be called once the server received the results from the client.
  • Method Details

    • onCall

      void onCall(T result)
      This method will be called once the server received the results from the client. The actual result will be passed as parameter.
      Parameters:
      result - the actual result the server received from the client.