Discussion in 'Plugin Requests' started by veyronity, Mar 12, 2024.

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


    A Simple Plugin that allows staff to change their groups

    (using luckperms)
    - user is in group.staff and group.mod
    [ - group.mod has all the staff permissions necessary for moderating ]
    [ - group.staff has the permission needed to toggle on/off staffmode ]

    - user issues /staffmode off
    - user is removed from group.mod BUT stays in group.staff

    - user issues /staffmode on
    - user is re added to group.mod using his permission from group.staff, while staying in it ofcourse

    if someone would like to make it pls lmk
    Last edited by a moderator: Mar 12, 2024
  2. Offline


    Hey what version of Minecraft do you want this plugin to be on, also do you think you can elaborate on how the plugin is meant to work, from what I understand it seems that you want a plugin that when a player types /staffmode on, it adds them to a mod group, and then when they type /staffmode off it sends them back to whatever group they were before?
  3. Offline


    According to Vault's README, LuckPerms is supported. Vault should handle any version-dependent code, so you can probably just go ahead by hooking into the Vault API. Furthermore, I don't believe the Bukkit API has changed enough to make the rest of the requested plugin version-dependent.
  4. Offline


    I'll take a look into that thanks for the heads up, still though I need answers about how the plugin should specifically function.
    KarimAKL likes this.
  5. Offline


    Just use a "command alias plugin" and bind the "luckperms change group commands" to /staffmode on|off
  6. Offline


    Originally, the moderator has both permissions group.mod and group.staff
    After he issues the command, group.mod is removed from him, so hes now a normal player
    if he uses /staffmode on again he is re-added to group.mod

    now on my server there is group.mod and group.helper, so if its impossible to differentiate them if both only have group.staff (after /staffmode off) then we can do a 3rd group named group.modtoggle and group.helpertoggle, which basically is like group.staff but differentiates between mod and helper

    the command is /lp user {playername} permission unset group.mod/group.helper
    so problem #1 is {playername} variable, problem #2 differntiating between mod and helper. it needs a plugin

    for simplicity purposes a 2-command solution can be made.
    /helpertoggle on|off -> requires group.helpertoggle permission -> adds/removes group.helper
    /modtoggle on|off -> requires group.modtoggle permission -> adds/removes group.mod

    Edit 17 march:
    ok so I basically did that last part and its somewhat working, altho too many commands and groups - /at /dt /mt /ht for admin dev mod helper and then 4 groups for toggling permissions respectively - still need a plugin
    Last edited: Mar 17, 2024
  7. Offline


    Hello there. I have made a plugin which is a more general purpose/customizable version of what you requested.
    There is a configuration included in which you can define custom commands, which will toggle the specified permissions for that command. Each command has customizable messages for toggling on and off, as well a customizable usage permission and also customizable arguments (in case you want to replace "on" and "off" with something else).

    The plugin uses Vault as a dependency for the permission changing and you will also need a permission-manager plugin such as LuckPerms or the changes in permissions will not actually take effect.
    The permission-manager plugin this plugin was tested with is LuckPerms, since you specifically mentioned that (and also because I am familiar with it).
    There is no dependency on any permission-manager plugin, only on Vault itself

    If you find any bugs, have a question or want to request a change or additional features, please reply to this post.

    Plugin jar file and source code are attached

    P.S.: The name of the plugin is PermissionGroupToggle because that was the original intention of your request and thats just the name I initially chose, but it will obviously work for toggling any permission and not just permission groups.

    Attached Files:

    Last edited: May 13, 2024
  8. Offline


    Thanks for taking the time to make this plugin!

    I might be wrong but I think this is for one permission group only?
    What I was originally asking for is if the command is run, the Plugin checks what permission the user has and toggle a group depending on it
    if the user has;
    - group.helpertoggle then toggle group.helper
    - group.modtoggle then toggle group.mod
    - group.devtoggle then toggle
    and so on

    Currently I have to do a command for each (I tried just repeating `staffmode` for each but did not work) so it's similar to the command alias solution I have worked out using `/lp user permission set`

    Regardless, thank you. if you're not going to edit it, that is totally fine.
  9. Offline


    I see, I may have missunderstood the request then. I can change the functionality to what you described. I will work on this later today

    EDIT: Made a second plugin that follows the requested functionality.
    Please let me know if this functionality is correct. If you find any bugs, have a question or want to request changes or additional features please let me know as well

    Plugin jar and source code attached

    Attached Files:

    Last edited: May 14, 2024
  10. Offline


    Thanks so much!

    It's working perfectly
Thread Status:
Not open for further replies.

Share This Page