Searching for a way to have different gamemode according to the group

Discussion in 'Spigot Plugin Help' started by Spekuloos, Jan 19, 2020.

  1. Well, as it says in the title, I'm trying to find a way to change the gamemode of the player automatically when he switches from a group to another.
    Exemple: When a player connect to my server the first time he is in the default group. He is in spectator gamemode and he can switch between survival and spectator but he can't break blocks, damage someone or be damaged.
    Then, if I change his group to Player he automatically switch to survival mode and play normally.

    So my questions are:
    - How to automatically change gamemode according to a group ?
    - How to prevent damage to a player and damage from a player to mobs and other players ?

    My plugin list:

    PS: I've seen that we can give permission to player to take no damage from several sources with EssentialsXProtect but i tried it without success :/ [​IMG]
    #1 Spekuloos, Jan 19, 2020
    Last edited: Jan 19, 2020
  2. make that the default group can only access the gamemode specator and not the gamemode suvival (why would you give them access to it if they can't do anything ?), then if you use a plugin that execute a command to change the player's group automatically, then add another command that change his gamemode
  3. I'm ok with your answer, but the problem is that when a player in the default group connect he is automatically in survival mode at the beginning.
    force-gamemode is false by the way
  4. then change the default gamemode in your Server-properties, it will set every new players to spectator and you won't have to enable force-gamemode
  5. I've thought about it and I just want to make the default group to be in survival but just can't do anything except walk in the world and write in the chat.
    So my only question is:
    - How to prevent damage to a player and damage from a player to mobs and other players ?

    PS: Because in spectator mode you can see too much things ;)
  6. maybe with EssentialsXProtect you can do that, you'll have to deny every permission from this plugin for the default group and allow them for the player group
  7. I've already tried enabling and disabling essentials.protect.damage.* but players from player and default group still take damage.
  8. try to give them essentials.protect.damage.disable
  9. Still taking damage =/
  10. Hello you need this