EbonJaeger / perworldinventory-kt

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

fly bug #112

Open seema84 opened 5 years ago

seema84 commented 5 years ago

Plugin Version: 2.2.2 Server Version: CraftBukkit version git-Spigot-518206a-a5b9c7b (MC: 1.13.2)

scenario:

  1. two worlds (creative and survival)
  2. give a player a spectator or creative mode in the survival world
  3. player go in the creative world
  4. player go back to the survival world in the right gamemode (survival) but can fly
ProSl3nderMan commented 5 years ago

Could you post your config.yml (located inside perworldinventory folder) and a list of your plugins? I am attempting to replicate this but am unable to. Also, is the player being tested on an op or not?

seema84 commented 5 years ago

config: https://pastebin.com/vuERkvWs

the player had no op

ProSl3nderMan commented 5 years ago

@seema84 Changing separate-gamemode-inventories: from false to true seems to fix this problem. Having it set to true means that if you have steak and diamonds in your survival inventory, when you go into the creative gamemode (/gm creative) it'll have different items. I'm checking out the code to see if there's a way to fix this bug without changing the separate-gamemode-inventories: from false to true, so that your hand is not forced.

seema84 commented 5 years ago

but I don't want a separate gamemode inventorie i hope you can fix this bug :)

ProSl3nderMan commented 5 years ago

@seema84 according to #106 , this person was reporting the same issue you are having, which was fixed. All you would have to do is to change can-fly and flying from true to false in the config.yml under player.stats.

If you want these two settings to be true, then you'll have to wait for EbonJaeger to find a way around this as I do not understand the section of code this problem exists in.

@EbonJaeger I believe the problem exists in ProfileManager.kt in private fun transferFlying. What I believe that needs to be added to fix the problem he is having is to check if the next world's default gamemode is survival, and if so to disable fly.

seema84 commented 5 years ago

okay i will try it