Prevent Players Using Some Commands

Discussion in 'Systems Administration' started by ThomasGW, Oct 7, 2019.

Thread Status:
Not open for further replies.
  1. Hello. Currently, I'm running a eco-survival server and I'm using EssentialsX and PermissionsEx for different ranks. I only want to let players use /bal and /sethome so I added their permissions in the PEX permissions file. I didn't add "essentials.*" in the file but players can still use commands like /jump and /jumpto. If I add "- -essentials.*" in the file, it disables all essentials commands for players. How to solve this problem? Thanks! This is my PEX permissions file:

    groups:
    Default:
    options:
    default: 'true'
    prefix: '&7[Default]'
    permissions:
    - -worldedit.*
    - essentials.home.*
    - essentials.pay
    - multiverse.access.*
    - -signcolors.reload
    - signcolors.*
    - coreprotect.inspect
    - modifyworld.*
    - tim.atm.use
    - essentials.sethome.multiple
    - essentials.sethome.default
    - essentials.sethome
    - essentials.home.bed
    - essentials.delhome
    - essentials.home
    - -minecraft.pl
    - -simplesit.sit
    - -simplesit.lay
     
    #1 ThomasGW, Oct 7, 2019
    Last edited: Oct 7, 2019
  2. Add - -essentials.jump
    Alternatively you can use a commandblocker plugin to easily disable commands and customize the message displayed to users that don't have the permission to run the command (also saves times from looking up permissions from every plugin as long as you know the command).
     
  3. Thanks! It solved the problem perfectly!!! :)
     
  4. Mark as solved please ;)
     
  5. Strahan

    Benefactor

    This is pointless. By default there are no permissions, so you don't need to negate what they do not have anyway.

    You're better off explicitly defining permissions rather than giving all then taking away. In this config, you're allowing people to run the database upgrade command for example.

    You should never use * unless in a situation where it is warranted, like something that enumerates lists of items. You shouldn't use it for lists of permissions unless the rank is administrative. Even then I typically avoid it. Yea, it's a pain in the ass to sit down and figure out every node that a player should have, but it's the right way to go. Don't be lazy; it only has to be done once after all.
     
Thread Status:
Not open for further replies.