1
0
mirror of https://e.coding.net/circlecloud/MiaoBoard.git synced 2024-11-22 01:49:05 +00:00

fix: 异步事件未转移到异步线程

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2017-08-17 15:27:08 +08:00
parent 840c42d39c
commit a6585f11db

View File

@ -29,6 +29,7 @@ public class SidebarBoard extends Board {
@Override @Override
public void update(final Player player) { public void update(final Player player) {
Bukkit.getScheduler().runTaskAsynchronously(getPlugin(), () -> {
final SiderbarBoardPage boardPage = this.getBoardPage(player); final SiderbarBoardPage boardPage = this.getBoardPage(player);
if (boardPage == null) { return; } if (boardPage == null) { return; }
TitleUpdateEvent te = new TitleUpdateEvent(player); TitleUpdateEvent te = new TitleUpdateEvent(player);
@ -43,5 +44,6 @@ public class SidebarBoard extends Board {
Bukkit.getPluginManager().callEvent(be); Bukkit.getPluginManager().callEvent(be);
boardPage.setBody(be.getBody()); boardPage.setBody(be.getBody());
player.setScoreboard(boardPage.getBoard()); player.setScoreboard(boardPage.getBoard());
});
} }
} }