网易我的世界论坛
标题:
setCommand 不存在?
[打印本页]
作者:
太康童心少年
时间:
2020-12-15 22:55
标题:
setCommand 不存在?
代码是这样写的:
self.levelId = serverApi.GetEngineCompFactory().CreateExtraData(serverApi.GetLevelId())
commandObj = serverApi.GetEngineCompFactory().CreateCommand(self.levelId)
_tempcmd="/say 执行"
logger.info(_tempcmd)
commandObj.setCommand(_tempcmd,args['playerId'],False)
报错信息如下:
AttributeError: 'CommandCompServer' object has no attribute 'setCommand'
有没有遇到相同问题的
作者:
境界线
时间:
2020-12-16 10:30
接口名叫做SetCommand噢,你S没大写
欢迎光临 网易我的世界论坛 (https://mc.netease.com/)
Powered by Discuz! X3.3