public abstract class AbstractPlugin extends Object implements Plugin
| Constructor and Description |
|---|
AbstractPlugin(BoundRoom room) |
| Modifier and Type | Method and Description |
|---|---|
BoundRoom |
getBoundRoom()
获取与当前 Game Hook 绑定的 Room 实例
|
void |
onBeforeJoinRoom(BeforeJoinRoomContext ctx)
加入房间前调用
|
void |
onBeforeLeaveRoom(BeforeLeaveRoomContext ctx)
离开房间前调用
|
void |
onBeforeSendEvent(BeforeSendEventContext ctx)
发送事件前调用
|
void |
onBeforeSetPlayerProperties(BeforeSetPlayerPropertiesContext ctx)
设置房间玩家自定义属性前调用
|
void |
onBeforeSetRoomProperties(BeforeSetRoomPropertiesContext ctx)
设置房间自定义属性前调用
|
void |
onBeforeSetRoomSystemProperties(BeforeSetRoomSystemPropertiesContext ctx)
设置房间系统属性前调用
|
void |
onCreateRoom(CreateRoomContext ctx)
创建房间前调用
|
void |
onDestroyRoom(DestroyRoomContext ctx)
房间关闭前调用
|
public AbstractPlugin(BoundRoom room)
public BoundRoom getBoundRoom()
PlugingetBoundRoom in interface Pluginpublic void onCreateRoom(CreateRoomContext ctx)
PluginonCreateRoom in interface Pluginctx - contextpublic void onDestroyRoom(DestroyRoomContext ctx)
PluginonDestroyRoom in interface Pluginctx - contextpublic void onBeforeJoinRoom(BeforeJoinRoomContext ctx)
PluginonBeforeJoinRoom in interface Pluginctx - contextpublic void onBeforeLeaveRoom(BeforeLeaveRoomContext ctx)
PluginonBeforeLeaveRoom in interface Pluginctx - contextpublic void onBeforeSetRoomProperties(BeforeSetRoomPropertiesContext ctx)
PluginonBeforeSetRoomProperties in interface Pluginctx - contextpublic void onBeforeSetRoomSystemProperties(BeforeSetRoomSystemPropertiesContext ctx)
PluginonBeforeSetRoomSystemProperties in interface Pluginctx - contextpublic void onBeforeSetPlayerProperties(BeforeSetPlayerPropertiesContext ctx)
PluginonBeforeSetPlayerProperties in interface Pluginctx - contextpublic void onBeforeSendEvent(BeforeSendEventContext ctx)
PluginonBeforeSendEvent in interface Pluginctx - contextCopyright © 2019 LeanCloud. All rights reserved.