[SPIGOT-6535] PlayerGameModeChangeEvent event incorrectly reports old gamemode Created: 12/Jun/21 Updated: 12/Jun/21 Resolved: 12/Jun/21 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Eccentric Devotion | Assignee: | Parker Hawke |
Resolution: | Fixed | Votes: | 0 |
Labels: | gamemode | ||
Environment: |
MacOS 11.4 |
Version: | CraftBukkit version 3124-Spigot-66f9d3c-384e116 (MC: 1.17) (Implementing API version 1.17-R0.1-SNAPSHOT) |
Guidelines Read: | Yes |
Description |
PlayerGameModeChangeEvent event incorrectly reports the player's old gamemode. public void onGameModeChange(PlayerGameModeChangeEvent event) { Player p = event.getPlayer(); GameMode oldGM = p.getGameMode(); GameMode newGM = event.getNewGameMode(); Bukkit.getLogger().log(Level.INFO, "OLD: " + oldGM + ", NEW: " + newGM); } The output on 1.17 when switching from survival to creative is: OLD: CREATIVE, NEW: CREATIVE The output on 1.16.5 when switching from survival to creative is: OLD: SURVIVAL, NEW: CREATIVE |
Comments |
Comment by Eccentric Devotion [ 12/Jun/21 ] |
Legends! Thanks for the quick fix |