You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
基础逻辑:
一个插件,放在不同的服务端下运行。
玩家A加入游戏,会被默认传送到服务端A运行的游戏1
情况I:玩家A可以在服务端BungeeCord的支持下从游戏1传送到服务端B运行的游戏2
玩家A退出游戏。
如何优雅的实现,判定玩家A如果离线了,那么从离线那一刹那起,记时间5分钟,如果在5分钟内未上线,则执行某些操作。
而情况I会触发如下事件,服务端A会触发玩家离线事件,服务端B会触发玩家进入游戏事件。
优雅的实现:就是仅在玩家最后上线的服务器中开始执行。
可能的实现?
就是监听玩家退出事件,如果玩家退出了,1秒后开始计时 检测玩家在整个服务器是不是在线 如果在线 退出计时
直到5分钟
5分钟之后执行一些工作
预留的问题?
但是占用内存 频繁的 创建 线程 感觉就是不优雅
All reactions