Listener optimizations (#1884)
* Drop CraftBukkit support, listeners cleanup * Codestyle * Codestyle * Remove useless player.saveData() calls * Micro optimization on the join process * Requested changes * Fix unit test * Test onPlayerHeldItem listener * Requested changes * Remove unused import
This commit is contained in:
@@ -89,8 +89,9 @@ public class AsynchronousJoin implements AsynchronousProcess {
|
||||
}
|
||||
|
||||
if (service.getProperty(RestrictionSettings.FORCE_SURVIVAL_MODE)
|
||||
&& player.getGameMode() != GameMode.SURVIVAL
|
||||
&& !service.hasPermission(player, PlayerStatePermission.BYPASS_FORCE_SURVIVAL)) {
|
||||
bukkitService.runTask(() -> player.setGameMode(GameMode.SURVIVAL));
|
||||
bukkitService.scheduleSyncTaskFromOptionallyAsyncTask(() -> player.setGameMode(GameMode.SURVIVAL));
|
||||
}
|
||||
|
||||
if (service.getProperty(HooksSettings.DISABLE_SOCIAL_SPY)) {
|
||||
|
||||
Reference in New Issue
Block a user