How to force a player to do a command even without perms?

Discussion in 'Plugin Development' started by hankered, Apr 26, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    hankered

    Hey, I need to paste a schematic where a player is without it having perms. Any ideas on how I would do this?
     
  2. Offline

    killerman747

    hankered
    Give them the permission to use the command, force them to run the command, then remove the permission.
     
    BillyGalbreath likes this.
  3. Offline

    Adriani6

    Use this
    Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(),<Your Command>);
     
  4. Offline

    BillyGalbreath

    That will not work for player specific commands, like the one the OP is asking about. This code is the equivalent of typing the command directly into the console.
     
    Adriani6 likes this.
  5. Offline

    hankered

    Cant they somehow superfast use another schematic? I'm not sure if worldedit can allow perms to specific schematics.
     
  6. Offline

    RawCode

    you can invoke command code directly ignoring checks...

    personally i just cant see any reason to force player command when you can invoke command's code.
     
Thread Status:
Not open for further replies.

Share This Page