From 466fb8cab99d2dd115c5afada39b3e4ed33d9cfc Mon Sep 17 00:00:00 2001 From: games647 Date: Thu, 26 May 2016 10:52:49 +0200 Subject: [PATCH] Run explicit non-thread-safe setGameMode sync --- .../fr/xephi/authme/process/join/AsynchronousJoin.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java b/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java index 245380ed..478dcda6 100644 --- a/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java +++ b/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java @@ -89,7 +89,12 @@ public class AsynchronousJoin implements AsynchronousProcess { if (service.getProperty(RestrictionSettings.FORCE_SURVIVAL_MODE) && !service.hasPermission(player, PlayerStatePermission.BYPASS_FORCE_SURVIVAL)) { - player.setGameMode(GameMode.SURVIVAL); + bukkitService.runTask(new Runnable() { + @Override + public void run() { + player.setGameMode(GameMode.SURVIVAL); + } + }); } if (service.getProperty(HooksSettings.DISABLE_SOCIAL_SPY)) {