Solved Only Op player can type commands

Discussion in 'Plugin Development' started by xSenseii, Aug 7, 2021.

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

    xSenseii

    I'm working on a bingo plugin, i almost finish the plugin but i noticed that only op play can type commans that i create, that weird becose in all fo my project that never happen i just created the command like i do all the time and this time only the op player can type the command

    plugin version: 1.16.1
     
  2. Offline

    rudraksha007

    there must be any other plugin which is causing this... there are scenarios where one plugin can interfere in other's work and even worse, sometimes causes other plugins to break.
    alternately, if it is your server, you can add a permission for that command and then add that perm to the default player group so everyone can use it!
     
  3. Offline

    xSenseii

    in the server there is just my plugin so that not an other plugin the cose, and i already tried to add the permission to all the player and that not working... or i does that wrong can you show me how can i do

    version plugin: 1.16.1

    EDIT: i managed to give the permission to the players when they connect to the server, they can type the command but the command appears red and the don't have the tab completion that i creat and they can't see the command in the /help
     
    Last edited: Aug 8, 2021
  4. Offline

    davidclue

    @xSenseii Show your code, you must have some permission check in there.
     
  5. Offline

    rudraksha007

    You might need to use permission plugin or just post your code, may be there is a mistake in there
     
  6. Offline

    xSenseii

    ho wow plot twist, I withdrew the part which give permission in the code and i tried again, still not working when the player connect to the server but when the player is in the server and i type /rl the player has all the permission automatically but when he left and re join he cant type the command
    and there is nothing in my PlayerJoinEvent and in my onEneble that give perm or something

    Edit: okay when a player join, he can type commands but the command appears weird but when that player died, the commands appears normal i dont know how to make the command normal without kill the player that maybe becose the server need to update permission ? how can i do it
     
    Last edited: Aug 9, 2021
  7. Offline

    davidclue

    @xSenseii We can't help you without your code..
     
  8. Offline

    xSenseii

    I found the solution ! that was not my code the probleme just in that version(1.16.1) when you add permission you must add that line; player.updateCommands() idk why but now it work.
     
Thread Status:
Not open for further replies.

Share This Page