Player Utils
基本信息
| 属性 | 值 |
|---|---|
| 类 | com.chaosthedude.naturescompass.util.PlayerUtils |
| 调用方 | PacketRequestSync、PacketTeleport、GuiNaturesCompass |
行为
判断玩家是否有权限使用 Nature’s Compass 的传送功能。
| 方法 | 判定 |
|---|---|
canTeleport(EntityPlayer) |
`cheatModeEnabled(player) |
cheatModeEnabled(EntityPlayer) |
单机服务器(server.isSinglePlayer())且 areCommandsAllowed() 返回 true |
isOp(EntityPlayer) |
通过 mcServer.getConfigurationManager().func_152596_g(player.getGameProfile())(对应 ConfigurationManager.canSendCommands(profile)) |
数值
无显式数值;纯布尔判断。
限制
func_152596_g是 MCP 1.7.10 混淆方法,迁移到新版需替换为canSendCommands。- 没有按群系/按维度的精细控制。