Use PermissionsEx commands with command block

Discussion in 'Spigot Plugin Help' started by Dvinuz, Jun 9, 2017.

  1. I have tried to google this and ask around, but I haven't found the proper solution. I’m trying to create a place/mountain on the server for new players, if the manage to climb it they can push a button and gain access to warp to place later. I know I can do that manual with the command.

    /pex user <user> add essentials.warps.[warpname]

    If I put the commannd in a commandblock nothing happends. I have tried diffrent commands, and they works, all of them.

    /time set 0

    /pex reload

    Do I need a plugin or do I miss something before I can get it to work?
     
  2. Thanks to BillyGalbreath on IRC I got some help with this. I have attached his reply as a future reference.

    The work around would be work with the new advancements or use the command line as mentioned here. The only problem is if somebody is standing close to the command block then all gets it, but I guess I can live with that.

    /pex user @p[r=<radius>] add <permission> [world]

    <billy> the logic behind that is that players can only active commandblocks by using redstone. so its actually redstone that triggers the commandblock. theres no way to trace back to the player that activated the redstone without a whole whopping mess of code and overhead (which would cause more lag to the already laggy redstone code)

    <billy> Dvinuz, you could look into the achievements thing for 1.12 - its new even to me, so idk if you can attach a command to an achievement or not, but what you described seems like it would be better suited for that.