Solved setGamemode() changes my Gamemode, but it works weird

Discussion in 'Spigot Plugin Development' started by shiosaku, Jan 6, 2020.

  1. When I use the function player.setGamemode(Gamemode.ADVENTURE), when I read the getGamemode() it says ADVENTURE, but I'm still being able to break blocks, anyone knows what happened?
  2. MrGeneralQ

    MrGeneralQ Previously qintinator

    By breaking blocks, you mean by hand? According to the docs:

    Code (Text):
    Enum Constant    Description
    Adventure mode cannot break blocks without the correct tools.
  3. Yes, by hand... and with the cooldown, not instantly if it were creative, more likely survival
  4. Have you tried to set your gamemode via the normal command to check if this is maybe a spigot-api error?