From 57e98da49f512723f262f5af3e7e802dcd7766a4 Mon Sep 17 00:00:00 2001 From: GaetanOff <61387206+UnknownMyName@users.noreply.github.com> Date: Sun, 17 Jan 2021 20:50:21 +0100 Subject: [PATCH] Sync patch --- com/gaetan/staffpin/data/PlayerData.java | 2 +- com/gaetan/staffpin/listener/PlayerListener.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/com/gaetan/staffpin/data/PlayerData.java b/com/gaetan/staffpin/data/PlayerData.java index 575b5d4..b8f6c17 100644 --- a/com/gaetan/staffpin/data/PlayerData.java +++ b/com/gaetan/staffpin/data/PlayerData.java @@ -84,7 +84,7 @@ public void correct() { this.player.getInventory().setArmorContents(this.getArmor()); this.player.updateInventory(); this.player.teleport(this.getLocation()); - TaskUtil.run((() -> this.player.setGameMode(this.getGameMode()))); + this.player.setGameMode(this.getGameMode()); this.setInventory(null); } diff --git a/com/gaetan/staffpin/listener/PlayerListener.java b/com/gaetan/staffpin/listener/PlayerListener.java index bc50a3a..500ab07 100644 --- a/com/gaetan/staffpin/listener/PlayerListener.java +++ b/com/gaetan/staffpin/listener/PlayerListener.java @@ -68,7 +68,7 @@ public void onChat(final AsyncPlayerChatEvent event) { event.setCancelled(true); if (event.getMessage().equals(playerData.getPin())) { - playerData.correct(); + TaskUtil.run(playerData::correct); return; }