EbonJaeger / perworldinventory-kt

Multi-world inventory plugin for Spigot written in Kotlin.
MIT License
46 stars 35 forks source link

The allowFlight state always seems to be loaded disregarding settings. #106

Closed Rickyboy320 closed 5 years ago

Rickyboy320 commented 5 years ago

Updating from version 2.1.0 to 2.2.1 seems to have introduced a bug on my server where having creative in one world would sometimes allow the player to fly in another world, even after being converted to survival.

Steps for reproducing seem to be: -Get creative and start flying in one world(group) -Teleport to another world group -Immediately teleport back, and see yourself flying in survival.

config.zip

We have the stats can-fly and flying disabled for loading across worldgroups, and gamemodes are purely handled by PerWorldInventory (all world groups are set as default-gamemode survival).

Judging the code in commit 0666a3092e3a4d789d76f1564dac1a76987dad85, there misses a check for the PlayerSettings.LOAD_FLYING property in the transferFlying function, but I'm not entirely sure if that has anything to do with it.

EbonJaeger commented 5 years ago

It looks like you are indeed correct. Sorry about that. Will fix this afternoon.