Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Suggestion] Provide LuckPerms Context for active/inactive maintenance mode #54

Open
Minecraftschurli opened this issue Feb 4, 2021 · 4 comments
Labels
1. enhancement New feature or request

Comments

@Minecraftschurli
Copy link

It would be nice if this Plugin would provide a Context for LuckPerms to for example give extra permissions when maintenance mode is active

@Minecraftschurli
Copy link
Author

this functionality could be accomplished with LuckPermsExtraContexts and PlaceholderAPI placeholders (which are currently only available when using BungeeCord)

@kennytv kennytv added the 1. enhancement New feature or request label Feb 5, 2021
@MichielEijpe
Copy link

Bump, I would love to see this feature

@heathfx
Copy link

heathfx commented Oct 15, 2021

another bump. I use contexts for tons of stuff and this would be handy!

@kennytv kennytv added this to the 3.0.9 milestone Dec 13, 2021
@kennytv
Copy link
Owner

kennytv commented Dec 27, 2021

Soo, what kind of contexts would be helpful? I can't really think of any usecases other than ignoring the given player and just adding whether maintenance is globally enabled and whether maintenance is enabled on the proxied server, like:

    @Override
    public void calculate(@NotNull final T target, @NotNull final ContextConsumer consumer) {
        consumer.accept("is-maintenance", Boolean.toString(maintenance.isMaintenance()));
        final String server = serverOf(target);
        consumer.accept("is-maintenance-on-" + server, Boolean.toString(maintenance.getSettingsProxy().isMaintenance(server)));
    }

or just "is-on-maintenance-server" for the proxied one (instead of "on-")?

@kennytv kennytv removed this from the 3.0.8 milestone May 23, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
1. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants