| Package | Description |
|---|---|
| cn.leancloud.play.plugin | |
| cn.leancloud.play.plugin.context | |
| cn.leancloud.play.plugin.request |
| Modifier and Type | Field and Description |
|---|---|
static Reason |
Reason.EMPTY_REASON |
| Modifier and Type | Method and Description |
|---|---|
Reason |
HookResponse.getReason() |
static Reason |
Reason.of(int appCode)
创建带自定义 appCode 的 Reason。appCode 为 Hook 实现者自定义的 code,比如可以用于在 Hook 拒绝某玩家的
请求等时候,通过发送 Reason 给玩家让玩家知道请求为什么被拒绝
|
static Reason |
Reason.of(int appCode,
String message)
创建带自定义 appCode 和 Message 的 Reason。appCode 和 Message 均为 Hook 实现者自定义实现。比如可以用于
在 Hook 拒绝某玩家的请求等时候,通过发送 Reason 给玩家让玩家知道请求为什么被拒绝
|
| Modifier and Type | Method and Description |
|---|---|
static <T extends RoomRequest> |
HookResponse.reject(Reason reason) |
| Modifier and Type | Method and Description |
|---|---|
void |
DestroyRoomContext.rejectProcess(Reason reason) |
void |
Context.rejectProcess(Reason reason)
拒绝本次请求,并发送 Reason 信息给发送请求的玩家
|
| Modifier and Type | Method and Description |
|---|---|
Reason |
LeaveRoomRequest.getLeaveRoomReason()
获取自定义离开房间原因,只有在踢人场景下发起踢人请求一方可以提供踢人原因,Actor 自
己主动离开房间或因为断线而离开房间时不提供原因。
|
Copyright © 2019 LeanCloud. All rights reserved.