Spigot CommandCompletionFilter 1.0

Filter out command completions using player permissions

  1. Phoenix616

    Resource Staff

    Phoenix616 submitted a new resource:

    CommandCompletionFilter - Filter out command completions depending on permissions

    Read more about this resource...
     
  2. hello i tryed it but it not working for me can help plz @Phoenix616?
    on spigot 1.13.2

    commands:
    fly: "essentials.fly"
     
  3. Phoenix616

    Resource Staff

    Works fine when I test it (with a different command but still), please provide your full config and a screenshot of the command in the completion list where it didn't get removed as well as some information about the permission of the player.

    PS.: With the default config all Essentials commands are already filtered out based on the command's permissions already ;)
     
  4. # Direct command to permission mapping:
    commands:
    fly: "essentials.fly"

    # Groups of commands that all share a similar permission syntax e.g. Essentials
    # Use %command% in the permission to replace command name in permission string
    # and %plugin% to replace the plugin name. (Both are lowercased)
    groups:
    groupname:
    permission: "pluginname.command.%command%"
    # Match by command name
    commands:
    - command
    - anothercommand
    basicplugins:
    permission: "%plugin%.%command%"
    # Match by plugin name
    plugins:
    - all

    on spigot 13
     
  5. Phoenix616

    Resource Staff

    Please provide the rest of the requested information. Also "all" is probably not a plugin name? You need to add the specific plugin name in question which doesn't add permissions for their commands.
     
  6. Only support 1.13 ?
     
  7. Phoenix616

    Resource Staff

    Yes, the new command completion system was only introduced in 1.13 so it will only support 1.13 and above.
     
  8. But with viaversion they can do the same at 1.8 server
     
  9. Phoenix616

    Resource Staff

    Well that old version does not have the event required to make this plugin work (and neither does ViaVersion) so I would suggest that you use a plugin that was made for it or suggest to ViaVersion that they backport the required event to your server version.
     
    • Useful Useful x 1
  10. So I don't know if I don't understand how this works or I'm just plain stupid, but there might be a chance something is not working as intended?
    1.14.3 paper btw
    EDIT: And before you ask, yes, I reloaded and restarted the server multiple times, tried to block vault-info in the "commands" section on the top of config - also didn't work.
     

    Attached Files:

    • uhm.jpg
      uhm.jpg
      File size:
      43.9 KB
      Views:
      10
  11. Phoenix616

    Resource Staff

    The list for command matching is called "commands" as seen in the first group, not "command".
     
  12. Fixed that and restarted, but it seems it had no effect. Command on list still does come up after /[tab].
     
  13. Phoenix616

    Resource Staff

    Works fine when I test it. Make sure that you don't have the permission and aren't op.
     
  14. I have a second account that I test it on. It has only default perms and is not opped.
    I regenerated the config and just added this:

    admincommands:
    permission: "commands.admin"
    commands:
    - stacker
    - wildstacker:stacker
    - vault-info
    - is

    If I understand correctly, this should block tab completing of the commands stacker, vault-info and is to players without permission commands.admin, right?
     
  15. Phoenix616

    Resource Staff

    Yes, that should block it and does when I try it.
     
  16. I have no words...
    I disconnected server from bungee and plugin started working. Reconnected it and it works just fine. I am confusion, but at least it works now, thanks for quick responses!
     
  17. Phoenix616

    Resource Staff

    Did you actually rejoin the Bungee before or did you just change servers after reloading/restart? 1.14 might need the reconnect to update the command list, not sure. (At least with 1.13.2 it seemed to work with simply changing the server or even world to update the changed config)
     
  18. Yes, I did. Now after I've made a list of commands it's supposed to block it seems to be working very... selectively? commands like vault-info are not displaying, but for example epay (pay form essentials) are displaying even if they are on the list of commands to block.
     
  19. Phoenix616

    Resource Staff

    I think that's because "epay" is an alias of /pay (I assume) Might want to try adding "pay" and see if it also blocks all aliases. (It basically tries to find the actual command first and if it does it uses the name of the command for searching for the permission, not the string that is actually in the config. So in your case it will find the pay command and see that it's not in the config so it allows it)
     
  20. So is there any way to not show things like /essentials: pay etc?