From d9e1bdf2bd7ad021e0aa677deeafbf9308fff5d9 Mon Sep 17 00:00:00 2001 From: glorydark <1083215364@qq.com> Date: Tue, 20 Feb 2024 17:52:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=B8=8D=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/glorydark/DLevelEventPlus/CheckTask.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/glorydark/DLevelEventPlus/CheckTask.java b/src/main/java/glorydark/DLevelEventPlus/CheckTask.java index a4553b6..98c3cd0 100644 --- a/src/main/java/glorydark/DLevelEventPlus/CheckTask.java +++ b/src/main/java/glorydark/DLevelEventPlus/CheckTask.java @@ -67,14 +67,9 @@ public void onRun(int i) { } } if (forceGamemode != -1) { - if (player.getGamemode() != forceGamemode) { - player.setGamemode(forceGamemode); - } + player.setGamemode(forceGamemode); } else { - int defaultGamemode = Server.getInstance().getDefaultGamemode(); - if (player.getGamemode() != defaultGamemode) { - player.setGamemode(defaultGamemode); - } + player.setGamemode(Server.getInstance().getDefaultGamemode()); } } }