diff --git a/changelog.md b/changelog.md index 686a7da..c40b39a 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ Version 1.2.2 ------------------------------------------------------ - Fixed a desync when changing dimension through teleportation +- Fixed false positives when checking for concurrent modifications while the player's gamemode is still unset ------------------------------------------------------ Version 1.2.1 diff --git a/src/main/java/io/github/ladysnake/pal/impl/VanillaAbilityTracker.java b/src/main/java/io/github/ladysnake/pal/impl/VanillaAbilityTracker.java index 6f8d085..a05a2f5 100644 --- a/src/main/java/io/github/ladysnake/pal/impl/VanillaAbilityTracker.java +++ b/src/main/java/io/github/ladysnake/pal/impl/VanillaAbilityTracker.java @@ -61,6 +61,11 @@ public boolean isEnabled() { } public void checkConflict() { + if (this.player instanceof ServerPlayerEntity + && ((ServerPlayerEntity) this.player).interactionManager.getGameMode() == GameMode.NOT_SET) { + return; + } + boolean enabled = this.isEnabled(); this.updateBacking(this.shouldBeEnabled()); // avoid false positives from gamemode changes boolean expected = this.isEnabled();