Skip to content

Commit

Permalink
移除不必要的判断
Browse files Browse the repository at this point in the history
  • Loading branch information
glorydark committed Feb 20, 2024
1 parent 9fb7cea commit d9e1bdf
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/main/java/glorydark/DLevelEventPlus/CheckTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
}
Expand Down

0 comments on commit d9e1bdf

Please sign in to comment.