Annotation Interface NetworkReplicated


@Retention(CLASS) @Documented @Inherited @Target({FIELD,TYPE,METHOD}) public @interface NetworkReplicated
The NetworkReplicated annotation signifies that the attached element is automatically replicated over the network by some system.
This does NOT imply it is synchronized immediately! This is not functional and exists for programmers only. It has a number of implications when used:
  - When used on a field, the field's value will be replicated and attempt to synchronize between the server and all clients.
  - When used on a class, the entirety of the class's members (inherited included) will be synchronized between the server and all clients.
  - When used on a method, the action performed when the method is called on the server will occur on all clients as well.
 
Note that all cases listed above assume the server is responsible for managing the value. If clientToServer is true, then the client performing the action must request that the server makes the change.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether or not the client is allowed to replicate its changes to the server.
    Of course, the server may still reject the request.
  • Element Details

    • clientToServer

      boolean clientToServer
      Whether or not the client is allowed to replicate its changes to the server.
      Of course, the server may still reject the request. This simply defines the capability.
      Default:
      false