Documentation

Communication between Packages

Sometimes, you want different Packages communicating with each other. In JC3:MP, you can do this using the EventSystem (Server documentation, Client cocumentation).

Communicating between two Server Packages

You can use jcmp.events.AddEvent and jcmp.events.CallEvent to communicate between two server packages. See the EventSystem documentation for more information and examples.

Communicating between two Client Packages

Communication between Client Packages works just like on the Server. Check out the EventSystem documentation for the client.

Communicating between Server and Client Packages

The EventSystem also provides you a way to send events from the Server to the Client and vice-versa.

Sending an Event from the Server to the Client.

The Server sends an Event using jcmp.events.CallRemote, while the Client receives the event by registering a handler using jcmp.events.AddRemoteCallable. Please read the documentation for examples.

Sending an Event from the Client to the Server.

The Client sends an Event using jcmp.events.CallRemote, while the Server receives the event by registering a handler using jcmp.events.AddRemoteCallable. Please read the documentation for examples.

Communicating between CEF and Client Packages

Sending an Event from the Client to a CEF UI

The Client sends an Event using jcmp.ui.CallEvent, while the CEF UI receives the event by registering a handler using jcmp.ui.AddEvent. You can find the Client UI Event functions here and the CEF functions here.

Sending an Event from a CEF UI to the Client

The CEF UI sends an Event using jcmp.CallEvent, while the Client receives the event by registering a handler using jcmp.ui.AddEvent.

Sending an Event from a CEF UI to another CEF UI

Use the jcmp.AddEvent and jcmp.CallEvent from the CEF jcmp object respectively. Documentation here.

Stay informed

By becoming the newest member of our growing forums, we and hundreds of other players will always keep you up to date on everything JC3:MP related.