|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.electrotank.electroserver4.extensions.BasePlugin
public abstract class BasePlugin
| Constructor Summary | |
|---|---|
BasePlugin()
Creates a new instance of BasePlugin |
|
| Method Summary | |
|---|---|
void |
destroy()
Automatically invoked when the object class is destroyed. |
PluginApi |
getApi()
|
void |
init(EsObjectRO parameters)
Automatically invoked when the object class is instantiated, after api is available. |
EsObject |
interop(EsObjectRO requestParameters)
Allows one plugin to send a message to another plugin, in a different extension. |
void |
request(String userName,
EsObjectRO requestParameters)
Handles a request from a specific user. |
void |
roomVariableCreated(String userName,
ReadOnlyRoomVariable variable)
|
void |
roomVariableDeleted(String userName,
ReadOnlyRoomVariable variable)
|
void |
roomVariableUpdated(String userName,
ReadOnlyRoomVariable variable,
EsObjectRO oldValue)
|
void |
setApi(PluginApi api)
|
void |
userBanned(String userName,
String message,
int duration)
Actions triggered when a user is banned from the server. |
ChainAction |
userEnter(UserEnterContext context)
Actions triggered when a user enters the room. |
void |
userExit(String userName)
Actions triggered when a user exits the room. |
void |
userKicked(String userName,
String message)
Actions triggered when a user is kicked from a room. |
ChainAction |
userSendPublicMessage(UserPublicMessageContext message)
Actions triggered when a user sends a public message. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasePlugin()
| Method Detail |
|---|
public void init(EsObjectRO parameters)
ExtensionLifeCycle
init in interface ExtensionLifeCycleparameters - EsObjectRO that may contain XML parameters to be readEsObjectRO,
ExtensionComponentConfiguration,
RoomConfiguration,
GameConfiguration
public void request(String userName,
EsObjectRO requestParameters)
PluginRequest
request in interface PluginRequestuserName - name of the userrequestParameters - EsObjectRO containing information about the requestpublic EsObject interop(EsObjectRO requestParameters)
PluginInterop
interop in interface PluginInteroprequestParameters - request
ElectroServerApi.callRoomPlugin,
ElectroServerApi.callServerPlugin,
ElectroServerApi.getRoomPlugin,
ElectroServerApi.getServerPluginpublic ChainAction userEnter(UserEnterContext context)
RoomUserEvents
userEnter in interface RoomUserEventscontext - UserEnterContext
public ChainAction userSendPublicMessage(UserPublicMessageContext message)
RoomUserEvents
userSendPublicMessage in interface RoomUserEventsmessage - UserPublicMessageContext
public void userExit(String userName)
RoomUserEvents
userExit in interface RoomUserEventsuserName - user who left
public void roomVariableCreated(String userName,
ReadOnlyRoomVariable variable)
roomVariableCreated in interface RoomVariableEvents
public void roomVariableUpdated(String userName,
ReadOnlyRoomVariable variable,
EsObjectRO oldValue)
roomVariableUpdated in interface RoomVariableEvents
public void roomVariableDeleted(String userName,
ReadOnlyRoomVariable variable)
roomVariableDeleted in interface RoomVariableEvents
public void userKicked(String userName,
String message)
RoomUserEvents
userKicked in interface RoomUserEventsuserName - user who was kickedmessage - reason for the kick
public void userBanned(String userName,
String message,
int duration)
RoomUserEvents
userBanned in interface RoomUserEventsuserName - user who was bannedmessage - reason for the banduration - duration of the ban in secondspublic void destroy()
ExtensionLifeCycle
destroy in interface ExtensionLifeCyclepublic PluginApi getApi()
getApi in interface Pluginpublic void setApi(PluginApi api)
setApi in interface Plugin
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||