#luckperms-api

1 messages Ā· Page 45 of 1

nocturne elbow
#

In 99% of the cases you probably just want both of them to be the same

fringe skiff
#

so .builder("Prefix", luckPerms.getGroupManager().getGroup(groupName).getPriority()) ?

#

also is luckPerms LuckPerms?

#

LuckPerms api = provider.getProvider(); i mean

nocturne elbow
#

You should probably put the actual Group object in a local variable, to add the node later and yes luckPerms is that

fringe skiff
#

why?

#

nvm

#

didnt read last part

#

šŸ™‚

#

got it

#

tyvm

nocturne elbow
#

yw

fringe skiff
#

Cannot resolve method 'getPriority' in 'Group' ?

#

oh

#

thats for nodes

#

fixed

#

'builder(java.lang.@org.checkerframework.checker.nullness.qual.NonNull String, int)' in 'net.luckperms.api.node.types.PrefixNode' cannot be applied to '(java.lang.String, java.util.@org.checkerframework.checker.nullness.qual.NonNull OptionalInt)' ?

PrefixNode newPrefixNode = PrefixNode.builder("[&#"+hexcode+":heart:&8]",sgroup.getWeight()).build(); just tryna do this

#

@nocturne elbow

frank driftBOT
#

Hey Lynx! Please don't tag helpful/staff members directly.

fringe skiff
#

NM_PensiveSad sry

nocturne elbow
#

Ah right, since groups can not have weight, Group#getWeight returns an OptionalInt

#

You can use OptionalInt#orElse(int default) to get the optional's value if present, or else the default/fallback value

#

so idk you can use 0 or 10 or whatever lol

#

As fallback

fringe skiff
#

what

nocturne elbow
#

But if the group has a weight of its own, it will return that one

fringe skiff
#

so

#

weight = group.getWeight().orElse(0)

#

?

nocturne elbow
#

Yeah that will do

fringe skiff
#

wait i just realized something very wrong; i said i had to change the group itself i meant the specific player's permission

#

jesus my brain

#

would getting the data from the group work same way with user?

nocturne elbow
#

Exactly the same way

#

Both extend PermissionHolder so yeah

fringe skiff
#

do i need to get the player in a specific way with LP or does a bukkit Player do?

nocturne elbow
#

You need an LP User, there are three ways you can get one, two of them for online players

fringe skiff
#

this would only be possible with online players

nocturne elbow
fringe skiff
#

yeah ty

#

was looking for it myself

#

thx

nocturne elbow
#

Yw

fringe skiff
#

this is much later, but i have successfully edited an user and still after saving it nothing happens

#

i dont see nothing new on the editor

#

and in game

#

if a group has permisisons does the user have too?

fringe skiff
#

is there some way i could have an event for changes in user permission nodes?

turbid solar
#

NodeAddEvent

#

NodeRemoveEvent

fringe skiff
#

???
what

turbid solar
#

Those 2 Events

fringe skiff
#

how'd i use them

turbid solar
#

!api

frank driftBOT
turbid solar
#

!cokkbook

frank driftBOT
rustic laurel
turbid solar
#

Is that an insult?!

rustic laurel
#

You tell me, is being dutch or sounding dutch bad

#

You'd know

fringe skiff
#

.

fringe skiff
nocturne elbow
#

get..Node?

fringe skiff
#

and

nocturne elbow
#

and what?

#

I can't read your mind

#

not sure what you want to check, but that's how you get the node you have all of it

fringe skiff
#

i meant

#

sorry

#

i meant how do i get what group got removed

#

i need to know if a specific group got removed

#

wait

#

groups are nodes right?

nocturne elbow
#

Yes, InheritanceNodes

fringe skiff
#

so

nocturne elbow
#

Check if the node type is NodeType.INHERITANCE, then you can cast to an InheritanceNode and get the group name

fringe skiff
#

how'd i get the group there's name?

#

how do i check a node type?

nocturne elbow
#

Node#getType

fringe skiff
nocturne elbow
fringe skiff
nocturne elbow
#

cast to an InheritanceNode

fringe skiff
#

InheritanceNode node = (Object)e.getNode() ??

nocturne elbow
#

an Object is not an InheritanceNode

#

an InheritanceNode is an InheritanceNode

fringe skiff
#

ah

#

InheritanceNode node = (InheritanceNode)e.getNode()

#

would this count as a group?

nocturne elbow
#

that would count as an InheritanceNode

#

an InheritanceNode represents a parent group, but it is not a Group

fringe skiff
#

ok

#

how'd i get the group then?

nocturne elbow
#

you can get the group name from the inheritance node

#

use the group manager to get the group from it

fringe skiff
#

okay

#

node.getGroupName() ?

nocturne elbow
#

sure

#

that looks like it would give you the group name, wouldn't it?

fringe skiff
#

..yea

#

lol

#

thx

#

how do i get the user from an event?

turbid solar
#

Which event

fringe skiff
#

noderemoveevent

turbid solar
#

d;lp NodeRemoveEvent

slate deltaBOT
#
public interface NodeRemoveEvent
extends NodeMutateEvent```
NodeRemoveEvent has 2 super interfaces, 1 extensions, and  2 methods.
Description:

Called when a node is removed from a holder

turbid solar
#

get Target

#

you can check if it's a user or group

steel gull
#

Hey I“m an noob in developing with luckperms an i need some help ... with the following code i tried to add a group to a user ... but well obvisoly it didnt work so can anyone help me?

public void addPermission(UUID uuid, String perm) {
    LuckPerms luckPerms = LuckPermsProvider.get();
    User u = luckPerms.getUserManager().getUser(uuid);
    Node n = Node.builder("perm").build();
    DataMutateResult r = u.data().add(n);
    luckPerms.getUserManager().saveUser(u);
    if(r.wasSuccessful()) {
        Bukkit.getPlayer(uuid).sendMessage("§3You recieved your rank!");
    }
}
nocturne elbow
#

That should work

#

Print the result value right before the if

steel gull
#

what do you mean ? i tried it

#

but it didnt work

nocturne elbow
#

Tried what

#

What doesn't work

steel gull
#

sry english not the best

kind swift
#

Hi everyone, I wanted to ask how do I add a permission to a single player, thanks in advance!

steel gull
#

with code or on an other way?

kind swift
#

code

steel gull
#

public void addPermission(UUID uuid, String perm) {
LuckPerms luckPerms = LuckPermsProvider.get();
User u = luckPerms.getUserManager().getUser(uuid);
Node n = Node.builder("perm").build();
DataMutateResult r = u.data().add(n);
luckPerms.getUserManager().saveUser(u);
if(r.wasSuccessful()) {
Bukkit.getPlayer(uuid).sendMessage("§3You recieved your rank!");
}

#

than this should work as Fefo says

nocturne elbow
#

Try printing the value of the DataMutateResult right before the if statement

kind swift
#

does this not add permission to the node?

nocturne elbow
#

???

steel gull
#

yes thats the thing you had to add i just copy and paste it from above

steel gull
kind swift
#

ok, thanks!

nocturne elbow
vestal rose
#

brr

somber saffron
#

how do i check if a user has a permission when a command is executed

#

the api docs arent that clear on how it should be implemented

nocturne elbow
#

player.hasPermission("my.permission")?

#

lol

somber saffron
#

i know thats how bukkit does it lol
does that also apply to luckperms?

nocturne elbow
#

LP injects its own Permissible into player objects (on Bukkit at least) so using that method will "redirect it" to LP

somber saffron
#

ok
so i shouldnt need a hashmap with permissions in it, since its injected directly into the player object?

nocturne elbow
#

????

somber saffron
#

nvm lmao

fringe skiff
#

is it NodeType?

#

cause i can't find something like a user type

turbid solar
#

Look at this

#

isUser

#

isGroup

fringe skiff
#

okay

#

do i need to do anything more than create my listener class to have a luckperms listener?

turbid solar
#

!api look at this

frank driftBOT
fringe skiff
#

jeeee

fringe skiff
#

can't see anything

#

do i just have to instance my class?

turbid solar
#

Show your code?

fringe skiff
#
public class LuckPermsListener {
    private THSupporterPerks main;
    private LuckPerms api;
    private LuckPerms lpapi;
    private Group sgroup;
    public LuckPermsListener(THSupporterPerks main, LuckPerms lpapi) {
        main = main;
        sgroup = main.api.getGroupManager().getGroup("supporter");
        EventBus eventBus = lpapi.getEventBus();
        eventBus.subscribe(this.main, NodeRemoveEvent.class, this::onNodeRemove);
    }
    private void onNodeRemove(NodeRemoveEvent e){
        if (e.getNode().getType() == NodeType.INHERITANCE) {
            InheritanceNode Inode = (InheritanceNode)e.getNode();
            if(Inode.getGroupName() == "supporter"){
                if(e.getTarget() instanceof User){
                    User user = (User) e.getTarget();
                    user.data().clear(NodeType.PREFIX.predicate(node -> node.getPriority() == 100));
                    main.api.getUserManager().saveUser(user);
                }
            }

        }
    }
}

im assuming i just have to instance it now since there's a constructor

turbid solar
#

Dont == for strings

fringe skiff
#

oops

turbid solar
#

Well it might work idk

fringe skiff
#

ah

languid walrus
#

Also I'm pretty sure you need to do this.main = main instead of main = main

turbid solar
#

Best to do getGroupName().equalsIgnoreCase or just equals

fringe skiff
nocturne elbow
#

you are passing null as something that should not be null

#

or the object you are passing is

languid walrus
#

THSupporterPerks v1.0-SNAPSHOT object is null I believe, right @nocturne elbow ?

frank driftBOT
#

Hey ValdemarF! Please don't tag helpful/staff members directly.

languid walrus
#

oop, sry

nocturne elbow
#

ah

#

well the plugin object they are passing is null so something gone wrong there

languid walrus
#

There should be something in error called caused by: though shouldn't there?

nocturne elbow
#

Not necessarily, exceptions can have a cause which is another exception, for example if within my plugin I have this method

public void someMethod() throws MyCustomException {
  try {
    // whatever
  } catch (IOException exception) {
    throw new MyCustomException(exception); // adding a causing exception, why this was thrown
  }
}

In that case when printing the stack trace yes, a "caused by" will be present, but if you simply do throw new NullPointerException("object is null"); there is no exception that caused the NPE I just threw, so it has no underlying cause, it's the exception's origin so to speak

neon meteor
#

Hello

#

How can I add a group to a user for x days?

nocturne elbow
#

lol they left half an hour after asking

nocturne elbow
#

Is there LP context that checks playerdata?

#

meaning..?

nocturne elbow
#

no like

#

if i want to check the playerdata of a file for contetxt

#

such as

#

"health"

somber saffron
#

anyone know why i get a java.lang.NoClassDefFoundError: net/luckperms/api/node/Node when loading my plugin?

        String stmt = "INSERT INTO data (UUID, Balance, Tokens) VALUES (?,?,?)";
        PreparedStatement statement = conn.prepareStatement(stmt);
        statement.setString(1, player.toString());
        statement.setString(2,"0.0");
        statement.setString(3,"0.0");
        statement.executeUpdate();
        LuckPerms luckPerms = LuckPermsProvider.get();
        User u = luckPerms.getUserManager().getUser(player);
        try {
            Node n = Node.builder(settingsConfig.getString("user-perms.balance")).build();
            Node n1 = Node.builder(settingsConfig.getString("user-perms.token")).build();
            DataMutateResult r = u.data().add(n);
            DataMutateResult r1 = u.data().add(n1);
            luckPerms.getUserManager().saveUser(u);
        } catch (NullPointerException e) {
            System.out.println("config is not setup!");
        }
    }```
thats the code^
nocturne elbow
#
  1. Make sure you have LP as a depend/softdepend of your plugin
  2. Make sure LP is installed..
  3. Make sure your targeted LP API version is 5.3 & the version you're running is also v5.3.x
#

!update in any case

frank driftBOT
somber saffron
#

dependencies: LuckPerms ?

nocturne elbow
#

depend: [ LuckPerms ]

somber saffron
#

thanks

gaunt portal
#

How do I update the prefixes/suffixes of a group object using the API?

rustic laurel
#

!api

frank driftBOT
rustic laurel
gaunt portal
#

Sort of vague on the relation of context adapters to something such as prefixes given they even have their own meta commands rather than using a key like the rest?

rustic laurel
#

is there a question somewhere in there because I can't extract one it is much too late

#

if you're looking for all available methods on a group object, you should check out the javadoc link

shy dagger
#

Hey, when I do Group rank = luckPerms.(whatever or tab something) nothing shows up. Tested LuckPerms.(whatever) as well. I looked at the docs and that's what it says. I have the API applied and I can use LuckPerms and import stuff from it

turbid solar
#

Show your code

shy dagger
#

hold on

#
package events;

import net.luckperms.api.LuckPerms;
import net.luckperms.api.model.group.Group;
import org.bukkit.Material;
import org.bukkit.block.Sign;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;

public class MakeSign implements Listener {

    @EventHandler
    public void PlaceSign(BlockPlaceEvent e) {
        if(e.getBlockPlaced().equals(Material.SPRUCE_SIGN)) {
            Sign sign = (Sign) e.getBlockPlaced();
            String[] lines = sign.getLines();
            if(lines[0].equalsIgnoreCase("[claimrank]")) {
                Group group = LuckPerms.
            }
        }
    }
}
#

here pom.xml

frank driftBOT
shy dagger
#

oh

#

lol

shy dagger
#

!api

frank driftBOT
shy dagger
#

Oh also, I have an instance in the main class and I can't get it in the class i'm coding at. not even the static one

turbid solar
#

LuckPermsProvider.get()

#

Or something

shy dagger
#

Thanks

undone plover
#

How do I call the /lp sync command via api?

nocturne elbow
#

/lp sync or /lp networksync?

#

they are two different things... ish

undone plover
#

Can you explain me what is what?

nocturne elbow
#

/lp sync will only refresh the data from storage on the server you run the command on
/lp networksync does that and uses the messaging service to ping all other servers to do the same

undone plover
#

Okay then I want to call networksync

nocturne elbow
#

okay then it kind of depends on context for it to actually work properly, run it after doing what exactly?

undone plover
#

So I am setting a rank for a user om the proxy server but then the spigot server doesnt notices that and doesnt set the prefix for him. So I want to call the sync method so its synced with the proxy

nocturne elbow
#

ah, alright, then in that case see the pinned message šŸ“Œ

undone plover
#

should I execute this on proxy or on spigot?

nocturne elbow
#

wherever the code that adds the rank runs

undone plover
#

alright I'll try that

nocturne elbow
#

if i wanted to find the node for /getpos

#

how would I u

#

(using verbose)

rustic laurel
#

do not ask in multiple channels

fringe skiff
#

Hello i have been trying to add the luckperms event api to my project, However i don't know how to actually instannce it

#

won't work

rustic laurel
#

!api

frank driftBOT
rustic laurel
#

These links (especially the first 2) have all the info u need

slate orchid
#

How to get this group in java?

rustic laurel
slate orchid
#

thx

brave lion
#

What is the NodeType of a group.<group> node being added to an user

nocturne elbow
#

NodeType.INHERITANCE

brave lion
#

thx

#

and than I use getValue to see the group he went ye?

nocturne elbow
#

No, InheritanceNode#getGroup or getGroupName, I don't remember exactly but something like that

brave lion
#

oh ok

nocturne elbow
#

getValue will get you the node value, true/false

brave lion
#

Oh so I need to cast the node to InheritanceNode

#

Also what about this: what do I need to change to change the parent group in LuckPerms using the database?

nocturne elbow
#

On a network & propagate the changes?

brave lion
#

Yep

#

This is if possible... if not I guess Im gonna need to use the panel API to send a command...

nocturne elbow
brave lion
#

Hum the problem is... I cannot change this using LP api... The software is not a plugin its a discord bot and a spring project so...

#

The easy way would be host the bot inside the server but and if I dont want that, its impossible?

nocturne elbow
#

I mean as long as it's JVM code that runs on the same JVM as the server (in essence, the server or a plugin extension) you should be able to use the LP API regardless, there are two or three places I can think of that have links to platform dependent but even then not fully, it's like 95% platform agnostic

brave lion
#

So lets see if I understand if the software is outside the minecraft server directory but it is inside the same dedicated server I can still use LP api? (Sry I didnt understand the first part of what you said...)

nocturne elbow
#

How are you giving the group node in the first place

brave lion
#

Im not...

#

I think it's better if I explain what I want better so I made a discord bot for my server and I want it to basically sync things from LP to discord and the same but opposite. Now to do this I made a discord bot with a spring boot application and a minecraft plugin to listen for group changes so I can send a GET web request to the discord bot (spring app) in order to update the user in the discord server but I cannot thing a way to do the same think but changing in the server. I could use Pterodactyl API but I think there is a better way?

#

English is not my first language so sry if I didnt explain well

nocturne elbow
#

Well no, unless it's a plugin on the mc server, there is no /sane/ and safe way of doing it
If you modify the database directly you'd have to send a /lp networksync to any of the servers (one only) to refresh loaded data
But then for polling data from the database you'd have to do it almost constantly

brave lion
#

So the best way

#

is to find a way to use Pterodactyl API to send a command in the console of one of the servers

#

to change the group

nocturne elbow
#

Best way would be to just dispatch good ol' LP commands on their own, they'll do all the syncing required

brave lion
#

Ye exacly...

#

so sending lp user user group set group would work

#

I guess

nocturne elbow
#

lp user luckperms parent set admin

brave lion
#

ye

#

How do I get the user where a node was added using NodeAddEvent?

turbid solar
#

getTarget?

brave lion
#

Ye... that returns the PermissionHolder right?

#

I need the UUID of the player

turbid solar
#

d;lp PermissionHolder

slate deltaBOT
#
public interface PermissionHolder```
PermissionHolder has 2 sub interfaces, and  13 methods.
Description:

Generic superinterface for an object which holds permissions.

brave lion
#

Oh wait nvm My bad

#

I can use e.getTarget().getIdentifier().getName()

brave lion
#

.......

neon sparrow
#

!usage

frank driftBOT
neon sparrow
#

i was in the wrong channel

#

that was by accident

#

thought i clicked on general

brave lion
#

Hum when does the primary_group change in the database? How do I make it so I just do something after it changes using NodeAddEvent or something like that?

nocturne elbow
#

it changes whenever the primary group changes

#

by default the primary group is your direct parent group with highest weight

brave lion
#

Hum I think the issue was with mysql connection not being instant

#

Im gonna add group as a parameter with the request like this it would not depend in the database to update the role in discord when its updated in the server

#

this should fix the issue

nocturne elbow
#

I mean yeah.. LuckPerms is not specifically designed to be operated with external non-plugin programs (or rather, not those that interact with it outside of the provided API.. especially if it's even outside of the java environment)

#

It's to be expected to do workarounds if you do that

brave lion
#

xD ye this is not being easy, I think the part of me being dumb is not helping šŸ¤¦ā€ā™‚ļø anyways thx for helping.

slate orchid
#

How to get all players who have a specific group?

nocturne elbow
#

!cookbook there's an example for that in the example api usage plugin

frank driftBOT
slate orchid
#

ok thx

raven pelican
#

Hey, how can I get all Users in a specific Group

nocturne elbow
#

read 3 messages above

raven pelican
#

got it thanks!

nocturne elbow
#

api abuse

raven pelican
#

also is there a way to make a error message if the NodeMatcher has no result?

nocturne elbow
#

uh.. check if the resulting collection is empty?

turbid solar
#

size =0?

nocturne elbow
#

lol

untold cloud
#
        MetaNode node = MetaNode.builder("chatcolor", postNode).build();
        User user = lpAPI.getUserManager().getUser(player.getUniqueID());
        user.getData(DataType.NORMAL).add(node);
        lpAPI.getUserManager().saveUser(user);

how can I set a meta node instead of adding?
so like removing any other key on the user that has "chatcolor"

turbid solar
#

!cookbook

frank driftBOT
turbid solar
#

Has an example for groups iirc

river lance
#

I think, I must move my question here...
#support-2 message
I'm on Bungeecord and have a Command to toggle a context value. Works fine with the Permissions but the TAB complete is a bit slow.
If I use the lpb command to give/take a permission of a command, it work instantly, so I missing a bit of code...

nocturne elbow
#

you probably need to signal the context update

#

ContextManager#signalContextUpdate(Object player)

river lance
#

Thanks again ā¤ļø

shy dagger
#

would i be using
user.setPrimayGroup(group.getName()) // group is an object
because
user.setPrimayGroup(group) gives an error

nocturne elbow
#

that method doesn't quite do what you probably want to do..

#

what do you want to do?

shy dagger
#

set a player's group

nocturne elbow
#

yeah no

#

not like that

shy dagger
#

okay so how do I do it

nocturne elbow
#

take that example plugin as reference :)

shy dagger
#

alr

stark locust
#

Hi!
Is it possible to get the weight from an PrefixNode?

nocturne elbow
#

did you try checking the method PrefixNode has?

stark locust
#

Yeah I checked, but I do not find anything, for the group weight I tried this and it works:

                LuckPermsProvider.get().getUserManager().getUser(player.getUniqueId()).getCachedData().getMetaData().getPrimaryGroup()
        )).findFirst();
        int weightInt = (99-(lpWeight.isPresent() ? (lpWeight.get().getWeight().isPresent() ? lpWeight.get().getWeight().getAsInt() : 0) : 0));```
nocturne elbow
#

Check out the methods

#

getPriority

stark locust
#

wait

nocturne elbow
#

I wait

stark locust
#

I get it

#
        Optional<PrefixNode> pn = pUser.getNodes(NodeType.PREFIX).stream().findFirst();
        pn.get().getPriority();

thats all

#

?

nocturne elbow
#

Looks good

stark locust
#

wow, thanks, sometimes I am braindead xD

teal hill
#

How to set "non set" a node?
can be via adding/removing PermissionNode.builder("perm").build() to/from data?

nocturne elbow
#

@teal hill do you want to remove a node (like with lp user .. permission unset) or to set it to false?

river lance
turbid solar
#

Theres an option in the LP config to change that iirc

river lance
turbid solar
#

Sec

#

update-client-command-list

river lance
#

Oh, that's in the bukkit config, I'm on bungee/waterfall and there is no update-client-command-list...

turbid solar
#

Oh

#

Not sure then

nocturne elbow
#

can i got help?

turbid solar
#

!ask

frank driftBOT
#
Please ask your question!

Please ask the question you have. Don't ask to ask, or ask to DM someone. There are people here to help you, but we need to know what to help you with, so please just ask the question you want to in as much detail as possible!

Or, try here first:
Why shouldn't I ask to ask?
hushed oxide
#

Luckperms editor restfull api?

turbid solar
#

No

signal lagoon
#

How does luckperms do /lp user <user> parent set <rank>

#

Im trying to make an alias plugin for it, does it just set the users primary group to that group

#

I feel like there has to be more

turbid solar
#

!cookbook

frank driftBOT
signal lagoon
#

Thx @turbid solar works like a charm!

frank driftBOT
#

Hey JaydenIsAPig! Please don't tag helpful/staff members directly.

signal lagoon
#

This methods gets everyone in the specified groups UUIDs, but how would i change it to getting their usernames instaid? ```String groupName = args[1];

            // Get a group object for the group name.
            Group group = api.getGroupManager().getGroup(groupName);

            // Group doesn't exist?
            if (group == null) {
                sender.sendMessage(ChatColor.RED + groupName +  " does not exist!");
                return true;
            }

            // Create a NodeMatcher, matching inheritance nodes for the given group
            NodeMatcher<InheritanceNode> matcher = NodeMatcher.key(InheritanceNode.builder(group).build());

            // Search all users for a match
            api.getUserManager().searchAll(matcher).thenAccept((Map<UUID, Collection<InheritanceNode>> map) -> {
                // Get a set of the group members (their UUIDs)
                Set<UUID> memberUniqueIds = map.keySet();

                // Tell the sender.
                sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&6" + group.getName() + " &2has&e " + memberUniqueIds.size() + " &2member(s)."));


                sender.sendMessage(ChatColor.GOLD + memberUniqueIds.toString());
            });```
turbid solar
#

the user manager has a way I think

#

d;lp UserManager#lookupUsername

slate deltaBOT
#
@NonNull
CompletableFuture<String> lookupUsername(@NonNull UUIDĀ uniqueId)
throws IllegalArgumentException, NullPointerException```
Description:

Uses the LuckPerms cache to find a username for the given uuid.

Returns:

a username, could be null

Throws:

IllegalArgumentException - if the username is invalid
NullPointerException - if either parameters are null

Parameters:

uniqueId - the uuid

turbid solar
#

Or use your platform for it

jolly jewel
#

I have a question. Before the API change there was a method in the Group.class isTemporary(). How I can check in the new API if the group is temporary?

turbid solar
#

get the InheritanceNode

#

!cookbook might have some examples

frank driftBOT
jolly jewel
#

So this way: group.getDistinctNodes().stream().filter(Node::hasExpiry) ...?

turbid solar
#

Do you want to check if a user' group is temp or..?

nocturne elbow
jolly jewel
#

I want to load from a user all tmp groups

turbid solar
#

You're getting the loaded groups*

#

You're not loading them yourself

river lance
#

Me again with my Question: #luckperms-api message
I also scanned the Git repo but can't find any code that helps me ...

nocturne elbow
#

oh you're updating spigot plugin permissions from the proxy

#

are you pushing updates?

obtuse jolt
river lance
#

All Commands within my own Plugin I'm only on Bungeecord/Waterfall and Permissions works fine, But the Client don't know that he has the Permissions and my Users are confused for 1 to 5 minutes....

obtuse jolt
#
  1. Is the plugin a bungeecord plugin or a spigot plugin?
  2. So the issue is only with tab complete?
river lance
#
  1. BungeeCord
  2. Yes
#

There should a line of code that updates the TAB list of commands for the client, I only can't find it^^

obtuse jolt
#

It depends on how you coded tab complete for your plugin

river lance
#

Not realy, the TAB for the command don't work.. Argument based TAB is a diverent story...

obtuse jolt
#

afaik, luckperms doesnt touch that at all

river lance
#

There must a way to "push" a update to the Client oO
If I use lpb commands it works fine, only my code has a delay -.-

nocturne elbow
#

are you updating spigot plugin permissions from the proxy?

obtuse jolt
river lance
#

Give me a minute I write an example to understand the issue...

obtuse jolt
#

and from what I know, the TAB for the command don't tie to any permission unless you have custom code or use a command framework that does it.

terse granite
#

how can I get users in a group ?

terse granite
#

that doesn't answers to my question ._.

obtuse jolt
rustic laurel
#

!API one of these links tells you how to get players in a group. And the trick is, you get players that have the group and not groups that have the players

frank driftBOT
rustic laurel
#

Oh look

#

Ben did it

#

Poggers, ben. Poggers

river lance
#

Ok, now I made a 2 min Video to show my problem and how it "works" with the lpb commands just to see it don't xD

#

What my code do:
User execute the Command /work to Add or remove his UUID from a List.
I wrote a ContextCalculator WorkCalculator to look if the user is in the list (true) ore not (false)

Is the User not Working the User don't have the /warp Command Permission /lpb group job permission set kleincraftbungee.command.warp work=true

If I use /lpb user KleinCrafter permission set kleincraftbungee.command.warp false the TAB vanish
And after /lpb user KleinCrafter permission unset kleincraftbungee.command.warp the TAB is visible again

https://youtu.be/TQXdXN7wMRI

A litte bit anoying this TAB Complete

ā–¶ Play video
#

In the Video #1:47 is a one time exception that TAB was not updated for the client fast enough but was updatet right after the command failed.
If I use my command it always need minutes to update not only seconds. And I can use the warp command multiple times without any update...
So I think there is an Update in the lpb command to force a TAB update...

vestal rose
#

hu

vestal rose
signal lagoon
#

Is there an api that allows me to easily get functions of LuckPerms, such as a players prefix

turbid solar
#

Yea

#

!cookbook

frank driftBOT
turbid solar
#

!api

frank driftBOT
limber cypress
#

how can i get groups that the player in?

#

btw that didn't work

nocturne elbow
limber cypress
#

ty for your assistance

crimson ferry
#

How can I get when the Players highest role expires?

nocturne elbow
#

NodeRemoveEvent

#

Check that the target is a user and that the node is an InheritanceNode

crimson ferry
#

No

#

I don't want to execute something when it expires.

#

I wanna get when it expires.

nocturne elbow
#

Oooohh

crimson ferry
#

Yes

#

Can I get that too?

nocturne elbow
#

yeah you can, but if you want it to be the one with highest priority you're gonna have to do some sorting yourself

crimson ferry
#

Yes thats no problm.

#

Also. How can I get it?

nocturne elbow
#

I guess you could do something like this

final User user = /* get user (player adapter or user manager) */;
final Instant expiry =
    user.getNodes(NodeType.INHERITANCE)
        .stream()
        .filter(Node::hasExpiry)
        .max(/* get groups from the inheritance node's group name, sort by group weight */)
        .map(Node::getExpiry)
        .orElse(null);

if (expiry == null) {
  // There was no temp parent group
} else {
  // There *was* a temp parent group, use the expiry
}
nocturne elbow
#

tbh you might be better off having a separate method for the sorting of the nodes based on group weights

#

instead of doing them right in there

crimson ferry
#

And I can't get the expiry time easier?

nocturne elbow
#

well you want the one of the highest temp group, assuming that's based on weight

#

right?

crimson ferry
#

Yes

nocturne elbow
#

well then you have to do sorting

crimson ferry
#

Also api.getGroupManager().getGroup(api.getUserManager().getUser(player.getUniqueId()).getPrimaryGroup());

#

Gets already the highest group

#

If its temp or not

#

It gets the highest

nocturne elbow
#

by default yes, but that can be changed in config (something not super common but I've seen it)

crimson ferry
#

Yes.

crimson ferry
nocturne elbow
#

you can, you'd have to get the temporary inheritance nodes for that group

crimson ferry
#

Ok and how?

#

Nvm

#

Thx

nocturne elbow
#

yw

rigid fulcrum
#

How can I set a Player the group ā€œadminā€ temporary with the API?

frank driftBOT
chrome geyser
#

someone help me plz

#

i'm trying to get user's primary group and then get group's prefix

#

but the user might be possibily offline

#

so it needs to be async the loadUser function

#

it dosnt work...

frank driftBOT
#

Hey yiatzz! Please don't tag helpful/staff members directly.

turbid solar
#

Dont ghost tag me

chrome geyser
#

my bad

#

i thought it was allowed

nocturne elbow
wild whale
mortal berry
#

Seems like permissions set by plugin/api doesn't list in the editor?

nocturne elbow
mortal berry
#

When I open the editor it doesn't list any permissions set by my plugin.

#

But they works

chrome geyser
#

the result would be this:

#

what i get is this

mortal berry
#

Ahh, nvm. Sorry

#

I used user.tranisentData().add

turbid solar
nocturne elbow
nocturne elbow
# chrome geyser

I believe you'd have to send the message within the loop though, let me inspect this closely

chrome geyser
#

there is the code

#

if i send the mssage within the loop it will send the message multiple times

nocturne elbow
#

eh I'm not exactly following what's going on but wouldn't it make more sense to build and send each line individually?

#

as a separate component instead of one larger single message

chrome geyser
#

what do u mean?

nocturne elbow
#

I mean don't build the whole thing as a single message with \ns

#

Send each line individually as they are made

nocturne elbow
#

Hi!
How can i get/set/add user groups with api?

#

I figured out how to do this. Groups are represented by permissions started with group. BTW

#

You should use the InheritanceNode.Builder

nocturne elbow
#

user.data(). i should better read manuals..

nocturne elbow
#

how to get prefix (prefix.something) for spigot plugin

turbid solar
#

!cookbook

frank driftBOT
nocturne elbow
turbid solar
nocturne elbow
#

prefix listener:

public class PrefixListener implements Listener
{
    Main plugin;
    LuckPerms luckPerms;

    public PrefixListener(Main plugin, LuckPerms luckPerms) {
        this.plugin = plugin;
        this.luckPerms = luckPerms;
    }

    @EventHandler
    public void Prefix(final AsyncPlayerChatEvent e)
    {
        final Player p = e.getPlayer();
        CachedMetaData metaData = this.luckPerms.getPlayerAdapter(Player.class).getMetaData(p);
        String prefix = metaData.getPrefix();
        e.setCancelled(true);
        String tocomawyslac = prefix + " | " + e.getPlayer().getName() + ": " + e.getMessage();
        Bukkit.broadcastMessage(tocomawyslac);
    }
}
#

main

        this.luckPerms = getServer().getServicesManager().load(LuckPerms.class);
<other classes>
Bukkit.getPluginManager().registerEvents(new PrefixListener(this, this.luckPerms), this);
        getLogger().info("- Prefix");
rustic laurel
#

You are likely not implementing it correctly, or you're using an old version of luckperms. It's unfortunately not possible for us to know all your code and how you're using so please be sure to read the wiki pages on the API as well as that one cookbook example

#

!api

frank driftBOT
rustic laurel
#

First and second links

turbid solar
turbid solar
#

prefix.<weight>.<Actual prefix>

regal swift
#

how to blacklist some world? with luckperms and essentials, like if someone(A) in the nether then he /tpa | tpahere B the B are blacklist and the teleport cancelled

#

nvm

nocturne elbow
#

oki

radiant edge
#

Hello, this is a newbie question but I can't figure out what I did wrong.
I'm followind the documentation (https://luckperms.net/wiki/Developer-API-Usage#saving-changes) but my IDE is giving errors because apparently LuckPerms.getUserManager() cannot be referenced from a static context, even if it's not static. This is the part of code that I've wrote, and it's in the main class. https://paste.lucko.me/LHO4jMVJWA

turbid solar
#

LuckPermsProvider.get()

#

Returns LuckPerms

radiant edge
#

ohh ty

turbid solar
#

!api

frank driftBOT
crystal sonnet
#

I'm trying to fire a UserDataRecalculateEvent through the API.
Tracing the code it looks like

luckPerms.getContextManager().signalContextUpdate(getNativePlayer());

should work but that just fires a ContextUpdateEvent

#

I mean I don't mind that event being fired but I also need the UserDataRecalculateEvent to be fired

crystal sonnet
#

Only code I can find that triggers that is actually modifying user data, which is not quite what I want

#

And the underlying calls are all in common

jaunty pecan
#

why do you need to fire one if user data hasn't changed?

river lance
#

The Context Changed so the Permission the User has also Changed too...
(Could fix my problem as well)

jaunty pecan
#

well the data hasn't changed - but the effective permissions have

#

so, you probably need to add an extra listener for the ContextUpdateEvent

nocturne elbow
#

Hiiiii
I am making a plugin, i want to track the rank (group) the player gets after promotion

public void onPlayerPromote(UserPromoteEvent event){
  String promotedTo = event.getGroupTo().toString();
  Player player = Bukkit.getPlayer(event.getUser().getUniqueId());
}

Is this the right way

#

I just want to get the rank name

turbid solar
#

What does getGroupto return?

nocturne elbow
#

it returns a optionable string

#

Optional<String>

turbid solar
#

.get() returns the name

#

You'll get an error if its null

nocturne elbow
#

aight thanks a lot

turbid solar
#

Whut?

cobalt horizon
#

Not sure if this is the correct channel for this, but could someone look into this question? Because he is apparently waiting for an answer to a question. https://github.com/lucko/LuckPerms/issues/2236#issuecomment-813810352

GitHub

I would like to ask if a Floodgate implementation is possible. What is Floodgate? Floodgate is a login variant for the GeyserMC project which allows Bedrock users to join a Java server. The Floodga...

jaunty pecan
#

sure, there ya go :)

#

assuming floodgate still operates in mostly the same way, those two event listeners are all that is needed

cobalt horizon
cobalt horizon
jaunty pecan
#

I could equally argue that screwing with authentication, allowing "non-standard" usernames and UUIDs is an issue that LuckPerms should not be expected to deal with

#

and in fact we do generally have that stance towards people running cracked/offline mode servers with weird auth / premium join plugins

cobalt horizon
potent thorn
#

Yeah, it seems like another alternative could be refactoring so the config option isn't even needed? If that's even plausible. I'm happy to help in that regard.

cobalt horizon
potent thorn
#

We don't need to argue about offline mode status or not. Luck's point about authentication screwing is valid.

jaunty pecan
#

I agree, and I wasn't saying the two were comparable in terms of morally right or wrong

#

but technically, they are doing the same thing

cobalt horizon
#

Yeah fair point

#

Btw do you guys need to have a way to do xuid / gamertag lookups? (I saw that mentioned in your reply on issue 2236)
Because that'll be in the Floodgate 2.0 api soon

potent thorn
#

With Luck's API suggestions, all I need is the prefix which you did implement in Floodgate's API.

jaunty pecan
#

yep, and there are events for uuid/username lookup too if you wanted to provide that integration

potent thorn
#

I think logically the API fits better in Floodgate, but that does set a precedent for our plugin to support other plugins which is less-than-ideal. The ultimate solution, in my opinion, would be making LP more flexible to weird usernames in a generic manner.

jaunty pecan
#

well, the generic fix-all solution is for floodgate users to toggle the existing allow-invalid-usernames setting in the LP config

potent thorn
#

True.

jaunty pecan
#

but it would be nice if things just worked ā„¢ļø and if the username -> xbox id lookups could be hooked in

potent thorn
#

I agree; toggling a config option is less than ideal.

jaunty pecan
potent thorn
#

Can you elaborate on the Paper option?

jaunty pecan
#

as I said though, I imagine that is unlikely

potent thorn
#

Yeah.

#

The core of LP's issue is that usernames can be added while offline, or even if they never joined. Is that correct?

#

Which is also, if I am correct, why the web editor doesn't have such an issue.

nocturne elbow
#

Actually I believe there is a method to add a Username -> UUID to the uuid cache, UserManager#something something savePlayerData

cobalt horizon
#

In the UserCache class itself (of nms)?

potent thorn
#

Or in regards to LP?

nocturne elbow
#

In LP's

#

Don't mind me, I just came in lol

potent thorn
#

No worries!

jaunty pecan
#

although I wouldn't say it's an issue -- more just what users expect to be able to do haha

potent thorn
#

Ah, yeah! xd

lime rune
#

When does the bukkit jarinjar file get loaded?

nocturne elbow
#

Conclure you know LP is open source right? lol

lime rune
#

Yeah but I mean cba heh

lime rune
#

Apparently AdvancedLuckPermsGUI throws NCDFE because of LuckPermsPermissible in the bukkit module isn’t loaded. Even though it should be loaded right assume ALPGUI is hardly depending LuckPerms.

nocturne elbow
#

Hm well the LuckPermsPermissible is inside the jarred jar so ALPGUI's PluginClassLoader won't be able to find it

lime rune
#

Yeah it’s stupid that it doesn’t just depend on the api. Hmm I guess I will have to rewrite the thing then rip

nocturne elbow
#

Well idk what it does but non-API in general (not LP exclusively) has always been something that shouldn't be relied upon lol that's what the API is for

lime rune
#

Indeed yeah it actually extends some of the lp bukkit classes bruh

tawny breach
#

Hello guys. How can i get all groups of player withouts they inheritance? I use the following method and it returns all intermediate groups to me, even if the player does not have them.

futureUser.thenAccept((user) -> {
    groupNames.accept(user.getInheritedGroups(user.getQueryOptions())
                          .stream()
                          .map(Group::getName)
                          .collect(Collectors.toList()));
});
nocturne elbow
#

You have to explicitly disable inheritance resolving in the query options, this is what I do myself

user.getQueryOptions()
    .toBuilder()
    .flag(Flag.RESOLVE_INHERITANCE, false)
    .build()
tawny breach
#

Thank you so much for your help, now everything works as expected.

nocturne elbow
#

yw!

jovial zealot
#

hello im really enjoying the mod , but can`t seem to figure out why I can not set up prefixes ( they seem not to appear on my nickname ) maybe some one has a list of common mistakes šŸ™‚

lime rune
#

Well, do you have a chat format plugin (which either supports vault or placeholderapi I think)

jovial zealot
#

i think i do not

nocturne elbow
jovial zealot
#

okay sorry

royal compass
#

how would I remove all suffixes from a user at a specific priority, like the meta removesuffix command?
i have user.data().remove(SuffixNode.builder("", 500).build()); but that doesn't remove them all or anything

nocturne elbow
#

You can skip the "new node" part and just clear priority == 500 ig

#

Although it depends on your end goal ĀÆ\_(惄)_/ĀÆ

#

And it'd be suffix instead of prefix

#

You get the idea lol

royal compass
#

alrighty

#

that works tysm!

nocturne elbow
#

yw :)

unkempt rampart
#

I am new to lp api

#

How to Hiw to change a users group using the Api, i am a lil confused

turbid solar
#

!cookbook

frank driftBOT
unkempt rampart
#

ty

unkempt rampart
#

why is it null (the api)

#

sender.sendMessage(ChatColor.RED + user.getUsername() + " is now in group " + group.getDisplayName());

turbid solar
#

d;lp Group#getDisplayName

slate deltaBOT
#
@Nullable
String getDisplayName()```
Description:

Gets the groups "display name", if it has one that differs from it's actual name.

The lookup is made using the current servers active context.

Will return null if the groups display name is equal to it's actual name.

Returns:

the display name

turbid solar
#

@unkempt rampart

unkempt rampart
#

tysm

nocturne elbow
#

why do i get nullpointer exception on this line?

CachedMetaData metaData = this.luckPerms.getPlayerAdapter(Player.class).getMetaData(p);```
#

no clue

#

send the whole stack trace

frank driftBOT
nocturne elbow
#

yeah

#

this.luckPerms is null

#

i know but this.luckPerms gets set

#

well, it's null

#

you can share the whole class and point out where it gets set

#
package pl.lightblock.engine.managers;

import net.luckperms.api.*;
import net.luckperms.api.cacheddata.CachedMetaData;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.scoreboard.DisplaySlot;
import org.bukkit.scoreboard.Objective;
import org.bukkit.scoreboard.Score;
import org.bukkit.scoreboard.ScoreboardManager;
import pl.lightblock.engine.Main;
import pl.lightblock.engine.commands.admin.chatmenu.ChatItemsMenu;

import java.util.Arrays;
import java.util.List;

public class Scoreboard {

    LuckPerms luckPerms;

    public Scoreboard(LuckPerms luckPerms) {
        this.luckPerms = luckPerms;
    }

    public void createScoreboard(Player p){

        ScoreboardManager manager = Bukkit.getScoreboardManager();
        org.bukkit.scoreboard.Scoreboard board = manager.getNewScoreboard();
        Objective obj = board.registerNewObjective("Score", "dummy");
        CachedMetaData metaData = this.luckPerms.getPlayerAdapter(Player.class).getMetaData(p); //line 30
        String prefix = metaData.getPrefix();
        obj.setDisplaySlot(DisplaySlot.SIDEBAR);
        obj.setDisplayName("§eLIGHT§fBLOCK§e.PL");

        Score score2 = obj.getScore(" ");
        score2.setScore(2);

        Score score3 = obj.getScore("§7Jesteś połączony z trybem: §eSkyBlock");
        score3.setScore(3);

        Score score4 = obj.getScore("§7Twój nick: §e" + p.getDisplayName());
        score4.setScore(4);

        Score score5 = obj.getScore("§7Twoja ranga: " + prefix);
        score5.setScore(5);
        /*
        Score score5 = obj.getScore("§7Gracze online: §e" + p.get);
        score5.setScore(5);
         */

        Score score6 = obj.getScore(" ");
        score6.setScore(6);

        p.setScoreboard(board);
    }
    public void updateScoreboard(){
        for(Player players : Bukkit.getOnlinePlayers()){
            createScoreboard(players);
        }
    }
}
#

@nocturne elbow

frank driftBOT
#

Hey nolemretaW! Please don't tag helpful/staff members directly.

nocturne elbow
#

okay and how are you constructing your Scoreboard class

#
final Scoreboard s = new Scoreboard(this.luckPerms);```
#

...

#

how are you initializing that this.luckPerms

#
    private FileConfiguration config;
    LuckPerms luckPerms;

    public JoinQuitListener(Main plugin, LuckPerms luckPerms)
    {
        this.plugin = plugin;
        this.luckPerms = luckPerms;
    }
    Main plugin;```
#

sigh

#

main

Bukkit.getPluginManager().registerEvents(new JoinQuitListener(this, this.luckPerms), this);```
#
getLogger().info("Initalizing LuckPerms API...");
        this.luckPerms = getServer().getServicesManager().load(LuckPerms.class);```
#
private LuckPerms luckPerms;```
#

okay finally

#

where is that? onEnable? onLoad? constructor?

#

onenable

#

it works for another listener

nocturne elbow
#

send the server log file please

#

^ can you delete logs above?

#

try adding LuckPerms to the depends list in your plugin.yml

#

I don't see why it shouldn't work but who knows

#

it is

#

:doubt:

#

[00:57:47] [Server thread/WARN]: [Engine] Loaded class net.luckperms.api.LuckPerms from LuckPerms v5.3.27 which is not a depend, softdepend or loadbefore of this plugin.

#

doesnt work

#

@nocturne elbow

frank driftBOT
#

Hey nolemretaW! Please don't tag helpful/staff members directly.

nocturne elbow
#

same error

#

Okay well let's see, share:
your main class
your plugin.yml
the latest log (you can use https://mclo.gs if you wish to censor IPs)

#

It's depends, not depend

#

Pretty sure

#

Yep

#

And the main class plss

supple ravine
nocturne elbow
#

Huh.. strange

#

Does it happen if you use the static accessor? LuckPermsProvider.get()?

#

where

nocturne elbow
#

Well instead of loading it from the services manager

nocturne elbow
nocturne elbow
#

Does it throw an NPE in the same place or another error?

supple ravine
nocturne elbow
#

Well shit I have no idea

#

Uuh

#

Try sysouting every step, function call return etc

#

So sysout luckPerms, sysout the result of getPlayerAdater, of getMetaData etc

tepid steppe
#

someone help!

#

the permission to use the tool

vague knoll
#

guys, question, how do I get all of the groups on the server in the api?

#

like get all created groups and put them in a list

obtuse jolt
#

!api

frank driftBOT
obtuse jolt
#

this is the exact method you probably looking for ^, but if you are new to the api, I suggest reading all the 3 links provided by clippy

vague knoll
#

hm ok

fickle pier
#

when i try to do System.out.println(Main.getLuckPermsApi().getUserManager().loadUser(p.getUniqueId())); then it just prints java.util.concurrent.CompletableFuture@251da86f[Not completed]

hollow widget
#

Its because UserManager::loadUser returns a CompletableFuture which is a tracker for another thread loading the user asynchronously.

obtuse jolt
#

read on "Using CompletableFutures"

hollow widget
#

@fickle pier
There are 2 things you can do:
If you're sure the player is online you can use: Main.getLuckPermsApi().getPlayerAdapter(Player.class).getUser(p); to just obtain the already loaded user.
Or if you're unsure or know the player is offline you can use the CompletableFuture like you did.

If you want to execute some code once the user was loaded by the CompletableFuture, you can choose one of these options:
Options by blocking the server Thread: (Try to avoid this path if possible)

  • CompletableFuture#get
  • CompletableFuture#join
    Options without blocking the server Thread:
  • CompletableFuture#thenAccept: This would perform a Consumer<User> upon receiving a User object.
  • CompletableFuture#whenComplete: Note that this one is not meant to use the resulting User object. But rather to parse through the right object. (Like if an exception was thrown)
#

Hope this steers you in the right direction for your desired end-goal.

brave lion
#

Is there any way to get the prefix of a offline user ?

turbid solar
#

Yes

#

!api

frank driftBOT
turbid solar
#

!cookbook

frank driftBOT
brave lion
#

How do I make it here so it waits for the loop to be done (with all the users picked up) and than yes send the message. Or is there any better way to do this?

crystal sonnet
brave lion
#

Hum thx

signal lagoon
#

So in the cookbook there is this code ``` if (args.length != 2) {
sender.sendMessage(ChatColor.RED + "Please specify a player & a prefix!");
return true;
}

    String playerName = args[0];
    String prefix = args[1];

    // Get an OfflinePlayer object for the player
    OfflinePlayer player = this.plugin.getServer().getOfflinePlayer(playerName);

    // Player not known?
    if (player == null ||!player.hasPlayedBefore()) {
        sender.sendMessage(ChatColor.RED + playerName +  " has never joined the server!");
        return true;
    }

    // Load, modify & save the user in LuckPerms.
    this.luckPerms.getUserManager().modifyUser(player.getUniqueId(), (User user) -> {

        // Remove all other prefixes the user had before.
        user.data().clear(NodeType.PREFIX::matches);

        // Find the highest priority of their other prefixes
        // We need to do this because they might inherit a prefix from a parent group,
        // and we want the prefix we set to override that!
        Map<Integer, String> inheritedPrefixes = user.getCachedData().getMetaData(QueryOptions.nonContextual()).getPrefixes();
        int priority = inheritedPrefixes.keySet().stream().mapToInt(i -> i + 10).max().orElse(10);

        // Create a node to add to the player.
        Node node = PrefixNode.builder(prefix, priority).build();

        // Add the node to the user.
        user.data().add(node);

        // Tell the sender.
        sender.sendMessage(ChatColor.RED + user.getUsername() + " now has the prefix " + ChatColor.RESET + prefix);
    });

    return true;
}```
#

Nothing seems to be wrong with that, but why does it always return true?

#

I ALWAYS return false when coding, so why does this do different, under my impression if you return true in a method that means it will CONTINUE doing the method am I wrong?

#

Such as right here, // Player not known? if (player == null ||!player.hasPlayedBefore()) { sender.sendMessage(ChatColor.RED + playerName + " has never joined the server!"); return true; } // Load, modify & save the user in LuckPerms. this.luckPerms.getUserManager().modifyUser(player.getUniqueId(), (User user) -> {

nocturne elbow
#

why would you always return false in onCommand?

#

Do you know what the return value means in CommandExecutor#onCommand?

signal lagoon
#

Maybe not

#

I could be wrong

#

I thought that when you return true it keeps going

nocturne elbow
#

No, when you return from a method it just exits is and provides the caller with the returned value

signal lagoon
#

Oh...

#

Im sorry

#

Thank you for teaching me!

nocturne elbow
#

https://papermc.io/javadocs/paper/1.16/org/bukkit/command/CommandExecutor.html#onCommand-org.bukkit.command.CommandSender-org.bukkit.command.Command-java.lang.String-java.lang.String:A-

If false is returned, then the "usage" plugin.yml entry for this command (if defined) will be sent to the player.

Basically you define the usage of the command in your plugin.yml, the core idea of it is that if the arguments sent don't match your cmd requirements (e.g. passing a name instead of a number when you need a number) you return false from onCommand and the usage text is sent

signal lagoon
#

WHAT

#

THAT IS SO COOL

#

I have a question, if I define the usage as, "&4What is up"

#

Will it return as dark red?

nocturne elbow
#

§

signal lagoon
#

How do you type that?

nocturne elbow
#

Some keyboard layouts have it uuh.. somewhere, I just Alt + 21

#

21 from the numpad

#

not the number row above

#

Anyway

signal lagoon
#

Dang thats cool

nocturne elbow
#

But like 99.999% of the time you will often see it just return true because you will send a custom message based on which argument you failed to parse

signal lagoon
#

So if you return true, whats the point of returning, because if you return false, then it stops but if you return true that just makes it so that it keeps going, so why just not return at all if you are going to return true?

nocturne elbow
#

when you return from a method it just exits is and provides the caller with the returned value

#

regardless of what value you return

signal lagoon
#

Oh ok

nocturne elbow
#

when you return you exit the method completely

signal lagoon
#

Ohhhhh

granite marlin
#

how can i use luckperms api in bungeecord?

turbid solar
#

!api

frank driftBOT
granite marlin
#

yeah i figured it out, i had to use the singleton thingy :))

#

are changes automatically pushed via plugin messaging when data is altered via the api?

turbid solar
#

No

frail olive
#

Is there a way to get a "dynamic" permission node like plugin.homes.limit.7 without just looping through 0-100 or something like that

nocturne elbow
#

Use meta nodes

#

Basically a key value pair

#

!cookbook there might be something about them here

frank driftBOT
nocturne elbow
#

I suggest you read the rest of the page too

#

The cookbook will surely help too

#

To add/give a meta node use the MetaNode.Builder

dull rover
#

Hey gamers. So I wrote some code a fat minute ago to check dynamic perms (I know, please don't yell at me) based on a number in a permission system. Apparently this has been failing on and off when I'm using the player.getEffectivePermissions(). So, I figured I would switch over to using the LuckPerms API for this. Would I do this the same way I currently am, which is to get all the permissions of the player, check if the permission starts with a specific part of the string, get the last index of it, such as my.perm.2 and then parse that to return the 2 and go from there or does LuckPerms have some kind of better approach for this?

nocturne elbow
#

Hello gamer

#

Read 7 messages above yours

#

@dull rover owo

#

Meta is specifically made for this kind of thing

#

Without them you'll have to loop through all nodes, no way around it I believe

#

I guess you could implement your own cache but you'd have to update it on every event that may or may not change the "active nodes"

dull rover
#

Lol I didn't even bother reading since I didn't realize the chance of someone else actually wondering the same thing.

nocturne elbow
#

Happens often

dull rover
#

I don't mind looping through all the nodes unless it's intensive. The checks aren't ran super often.

nocturne elbow
#

Eh unless we're talking about potentially tens of thousands of nodes I don't see it being an issue lol

south sparrow
#

Hello, how to issue a group to a person via API

nocturne elbow
#

!cookbook has exactly what you need

frank driftBOT
nocturne elbow
#

!api I also suggest you go over those 2 pages + the very useful javadoc :)

frank driftBOT
signal lagoon
#

I got this error ```org.bukkit.plugin.InvalidPluginException: net.luckperms.api.LuckPermsProvider$NotLoadedException: The LuckPerms API isn't loaded yet!
This could be because:
a) the LuckPerms plugin is not installed or it failed to enable
b) your plugin does not declare a dependency on LuckPerms
c) you are attempting to use the API before plugins reach the 'enable' phase
(call the #get method in onEnable, not in your plugin constructor!)

    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:135) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:292) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.craftbukkit.v1_8_R3.CraftServer.reload(CraftServer.java:739) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.Bukkit.reload(Bukkit.java:535) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:25) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchServerCommand(CraftServer.java:627) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.DedicatedServer.aO(DedicatedServer.java:412) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    at```
#
net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:375) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282]
Caused by: net.luckperms.api.LuckPermsProvider$NotLoadedException: The LuckPerms API isn't loaded yet!
This could be because:
  a) the LuckPerms plugin is not installed or it failed to enable
  b) your plugin does not declare a dependency on LuckPerms
  c) you are attempting to use the API before plugins reach the 'enable' phase
     (call the #get method in onEnable, not in your plugin constructor!)

        at net.luckperms.api.LuckPermsProvider.get(LuckPermsProvider.java:52) ~[?:?]
        at me.jayden.toggle.Utils.<init>(Utils.java:24) ~[?:?]
        at me.jayden.toggle.Commands.<init>(Commands.java:23) ~[?:?]
        at me.jayden.toggle.Main.<init>(Main.java:10) ~[?:?]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_282]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_282]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_282]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_282]
        at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_282]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
        ... 14 more```
#

I assume i have to do the Luckperms api = LuckPermsProvider.get

#

On enable, then get that api from other classes?

#

I could be wrong, (and yes i did softdeped btw)

obtuse jolt
#

!paste full startup log

frank driftBOT
#
Please use pastebin!

Seeing a paste of the problem makes everything so much easier! Use https://paste.lucko.me/ for easy pasting!

For console errors:

Pastebin any relevant segments of the console log. If it's a startup error, this includes the entire startup log!

Other errors:

Pastebin the entire LuckPerms config file (passwords removed) as well as any other relevant files!

radiant edge
#

Hello, I've been having errors with LP api, specifically when checking for a permission.
A NullPointerException is thrown when player.hasPermission(permission); is done. This is the stacktrace and full start log: https://paste.lucko.me/BZWF11Ke4O

obtuse jolt
radiant edge
#

it's really long ngl, what part would you want to check?

#

this is a little snippet, tell me if you need more.

#
private String perms;
perms = Rankups.getInstance().getConfig().getString("levels."+numerorank+".permission");
if(player.hasPermission(perms)){ //Exception here!
//check for points and checks applies permission.
}
obtuse jolt
#

looks like your perms variable is null

radiant edge
#

It shouldn't be

obtuse jolt
#

I wont know

#

Depends on your whatever this does Rankups.getInstance().getConfig().getString("levels."+numerorank+".permission");

radiant edge
#

it gets a string from the config, let me try with a "debug" step

obtuse jolt
#

I suggest you do some logging on these "levels."+numerorank+".permission" and perms variable

radiant edge
#

yeah exporting plugin now

#

yes it's null actually. Another issue with my bad coding. Sorry for bothering

south sparrow
#

How can I replace this piece of code with LuckPerms?

     for (int length = (groups = PermissionsEx.getUser(player).getGroups()).length, i = 0; i < length; ++i) {
       final PermissionGroup group = groups[i];```
obtuse jolt
#

!api

frank driftBOT
iron raptor
#

Hello, how to get the prefix of a player with the api (version 5-3 )

frank driftBOT
iron raptor
#

Thank

brave lion
#

Can I get the username of a User with upper characters?

nocturne elbow
brave lion
#

hum ok

gleaming void
#

Hi

#

I was using the api to detect when the player receives a position or loses

#

However, the NodeAdd event only works on normal servers, and I wanted a way to be able to do this verification by the bungee

#

I'm using syncnetwork

#

And it doesn't work

nocturne elbow
#

many events do not propagate throughout the network, your best bet tbh is to subscribe to events from these packages
https://javadoc.io/doc/net.luckperms/api/latest/net/luckperms/api/event/log/package-summary.html
https://javadoc.io/doc/net.luckperms/api/latest/net/luckperms/api/event/sync/package-summary.html
and "manually" parse the received log messages, there is no way for other LPs to know which data exactly to update;

You could potentially in a bit of an extreme case subscribe to UserDataRecalculateEvent but there is no before/after data to compare to, since it just discards everything and reloads the user from storage

gleaming void
nocturne elbow
#

Yeah you can get that info from the LogReceiveEvent, check that the action target type is a user and parse the description (probably something like "parent set <group>", play around with the event and check by yourself what you get)

gleaming void
#

Ok

#

Thanks

turbid solar
#

!cookbook for me

frank driftBOT
turbid solar
#

this should work right?

#

Or is there a better way to check if the user already has a meta with that key

nocturne elbow
#

yeah that ain't gonna work

#

use a MetaNode in the for loop and check if the getMetaKey is the same

#

getKey gets the whole node key basically

turbid solar
#

oh you can't even have multiple meta with the same key

nocturne elbow
#

Well you can since they are different keys (not meta keys)

unkempt depot
#

What is the permission node/meta given to a user with a parent group of "owner"

#

Trying to get a list of groups without using the api

nocturne elbow
#

group.<group>

unkempt depot
#

thank you

fallow imp
#

Hello, How can I load a user using only his name? I don't have the uuid

#

Feel free to mention if you know how

#

Solved, haven't seen the lookupUniqueID method

nocturne elbow
#

So I have this strange bug (or intended feature). When I run userManager.modifyUser() in an asynchronous thread, the inherited group is added to the user just fine, but as soon as I start querying all the inherited groups or run /lp user <username> info, that inherited group is gone. Does anyone have any idea why this happens?

steep sluice
#

I m

#

Hmmmm

turbid solar
#

Is it on the same server?

nocturne elbow
#

Yes

#

"as soon as"

#

how soon is "as soon as"?

#

The moment I call that method or command

#

It just vanishes and I no longer have the permissions

#

sample code?

#

hold on

#
UUID id = called.getUniqueId();
plugin.getServer().getScheduler().runTaskAsynchronously(plugin, new Runnable() {
    @Override
    public void run() {
        //...
        UserManager userManager = plugin.luckPerms.getUserManager();
        userManager.modifyUser(id, user -> {
            //1. Check if admin is already assigned
            Collection<Group> inheritedGroups = user.getInheritedGroups(user.getQueryOptions());
            for(Group group : inheritedGroups) {
                System.out.println(group.getName());
            }
            if(inheritedGroups.stream().anyMatch(g -> g.getName().equals("admin"))) {
                plugin.getServer().getScheduler().runTask(plugin, new RankAPIRunnable(RankAPIStatusCode.RANK_ALREADY_HAVE, callback));
                return;
            }
            Group adminGroup = plugin.luckPerms.getGroupManager().getGroup("admin");
            //2. Assign to the group until logout
            user.data().clear(NodeType.INHERITANCE::matches);
            Node node = InheritanceNode.builder(adminGroup).build();
            user.data().add(node);
            //3. Log
            plugin.getServer().getScheduler().runTask(plugin, new RankAPILogger(plugin, id, "added admin rank until logout"));
            plugin.getServer().getScheduler().runTask(plugin, new RankAPIRunnable(RankAPIStatusCode.SUCCESSFUL_LOGIN_FINAL, callback));
        });
        return;
    }
}
#

I mean that doesn't really show me the part you fetch the parent groups after calling modifyUser

#

userFuture.thenAcceptAsync(user -> {
    //1. Check if we have admin
    Collection<Group> inheritedGroups = user.getInheritedGroups(user.getQueryOptions());
    if(!inheritedGroups.stream().anyMatch(g -> g.getName().equals("admin"))) {
        plugin.getServer().getScheduler().runTask(plugin, new RankAPIRunnable(RankAPIStatusCode.RANK_DONT_HAVE, callback));
        return;
    }
#

or /lp user <username> info

#

I fail to see how that is "as soon as" but okay; what do the sysouts print? any errors? what lp version?

nocturne elbow
# nocturne elbow I fail to see how that is "as soon as" but okay; what do the sysouts print? any ...

After the code adds the admin group, it works just as intended fine with all the permissions enable, but when the code or command in my previous message gets called, it just says that the default group is assigned and the admin priviliges are immediately taken away.
Also, default has some commands disabled, but those are still enabled even after the admin group is gone
lp is 5.3.27 and no errors came up

#

huh

#

well i guess i'll test

#

seems to be working fine for me

#

Then I ran /lp user <user> info and it showed just as expected šŸ¤·ā€ā™€ļø

#

odd

#

i found the problem, the online-mode was set to false

#

Nope, that is not the problem

nocturne elbow
frank driftBOT
nocturne elbow
turbid solar
#

Ah crap

#

Wasnt meant for you

#

@surreal flower

frank driftBOT
#

Hey Heisser_Kakao! Please don't tag helpful/staff members directly.

turbid solar
#

Look at the cookbook for examples

odd vapor
#
        Node node = Node.builder("ray.chat").value(false).build();
        Main.luckPerms.getUserManager().modifyUser(Bukkit.getOfflinePlayer(args[0]).getUniqueId(), (User user) -> {
            if (user.data().contains(node, NodeEqualityPredicate.IGNORE_EXPIRY_TIME).asBoolean()) {
                user.data().clear(NodeMatcher.key(node));
                sender.sendMessage("§aPlayer unmuted");
            } else {
                sender.sendMessage("§cPlayer haven't mute");
            }
        });```
but
```java
user.data().contains(node, NodeEqualityPredicate.ONLY_KEY).asBoolean()```
always return false
#

I just want to see if the player has permissions ignore time

nocturne elbow
#

I mean that sounds about right

#

NodeMap#contains returns UNDEFINED if not set or the node value if otherwise

#

d;luckperms NodeMap#contains

slate deltaBOT
#
@NonNull
Tristate contains(@NonNull NodeĀ node, @NonNull NodeEqualityPredicateĀ equalityPredicate)
throws NullPointerException```
Description:

Gets if this instance contains a given Node.

Returns Tristate.UNDEFINED if the instance does not contain the node, and the assigned value of the node as a Tristate if it is present.

Returns:

a Tristate relating to the assigned state of the node

Parameters:

node - the node to check for
equalityPredicate - how to determine if a node matches

Throws:

NullPointerException - if the node is null

odd vapor
#

I check yea return UNDEFINED

#

but why

#

how I print user.data() I check and contains java ImmutableNode(key=ray.chat, value=false, expireAt=1619804185, contexts=ImmutableContextSet(contexts={}))

#

wants to check if the player has "ray.chat" with value false

nocturne elbow
#

!pasteit

frank driftBOT
#
Please use pastebin!

Seeing a paste of the problem makes everything so much easier! Use https://paste.lucko.me/ for easy pasting!

For console errors:

Pastebin any relevant segments of the console log. If it's a startup error, this includes the entire startup log!

Other errors:

Pastebin the entire LuckPerms config file (passwords removed) as well as any other relevant files!

odd vapor
nocturne elbow
#

if (user.data().contains(node, NodeEqualityPredicate.IGNORE_EXPIRY_TIME).asBoolean())

Again... NodeMap#contains returns UNDEFINED if it's not set.... and if it is set it returns the node value

#

If it's set to false, it will return Tristate.FALSE, which when you get it as a boolean, it's false

odd vapor
#

I don't understand sorry

turbid solar
#

node is set to false

#

so it returns false

nocturne elbow
#

in essence, what you are doing is

if (false) {
  // stuff that never runs
} else {
  System.out...
}
odd vapor
#

how should he do it?

nocturne elbow
#

Check if it's not undefined

#

If it's not undefined, then it's set to something, either true or false

odd vapor
#

and how should he do to check if it has options from the false option settings

nocturne elbow
#

Oh my god

#

For the 3rd or 4th time, NodeMap#contains returns a Tristate

#

Tristate can be one of three possible values:
Tristate.UNDEFINED (not set)
Tristate.TRUE (set to true)
Tristate.FALSE (set to false)

#

Please make an effort

odd vapor
#

a how set?

nocturne elbow
#

What?

odd vapor
#

My code return UNFINED

#

But I don't understand how set this

nocturne elbow
#

Where does it return undefined

#

Which line

odd vapor
#

26 but without asBollean

#

and 31

#

31 is line for test

nocturne elbow
#

Holy shit

#

It is not returning undefined

#

It's returning Tristate.FALSE

#

Because the node is FALSE

odd vapor
nocturne elbow
#

Okay, finally something useful

#

Run and screenshot /lp user <user> permission check ray.chat

odd vapor
nocturne elbow
#

Screenshot the entire thing

odd vapor
odd vapor
nocturne elbow
#

Okay we're getting somewhere

nocturne elbow
odd vapor
#

no don't change

nocturne elbow
#

Okay, I'll test later when I can, seems strange

odd vapor
#
        Node node = Node.builder("ray.chat").value(false).build();
        Main.luckPerms.getUserManager().modifyUser(Bukkit.getOfflinePlayer(args[0]).getUniqueId(), (User user) -> {
            if (user.data().contains(node, NodeEqualityPredicate.IGNORE_EXPIRY_TIME) == Tristate.FALSE) {
                user.data().clear(NodeMatcher.key(node));
                sender.sendMessage("§aPlayer unmuted");
            } else {
                sender.sendMessage("§cPlayer haven't mute");
            }
        });```
@nocturne elbow I change my code but didn't work
frank driftBOT
#

Hey Raymano! Please don't tag helpful/staff members directly.

odd vapor
#

I haven't idea

#

Maybe you know another method to check a player permissions entry?

nocturne elbow
#

@odd vapor From the javadoc for NodeEqualityPredicate.IGNORE_EXPIRY_TIME:

All attributes must match, except for the expiry time, which is ignored.
Note that with this setting, whether a node has an expiry or not is still considered.

In other words: the expiry time is ignored, but it has to be temporary

#

The check you should be looking to do is
if (user.data().contains(node, NodeEqualityPredicate.IGNORE_VALUE_OR_IF_TEMPORARY) == Tristate.FALSE)

nocturne elbow
#

Sorry it took so long, busy day

odd vapor
#

oke np

#

realy you are the best

#

you help so many people

nocturne elbow
#

you're welcome

crimson ferry
#

How can I give someone a temp role per API?

obtuse jolt
obtuse jolt
#

Look into InheritanceNode with expiry

crimson ferry
#

What is the key?

turbid solar
#

Key where

crimson ferry
turbid solar
#

Use InheritanceNode

crimson ferry
#

Ok

#

And how do I add it to the user then?

turbid solar
#

!cookbook

frank driftBOT
crimson ferry
#

Thx

crimson ferry
#

Why does userOrRideop doesn't gets set to true?? (The player's group name is default)

nocturne elbow
#

Care to check the warning highlighted on ==?

crimson ferry
#

Warning?

#

Oh ok

nocturne elbow
#

You don't compare Strings with ==, you compare them with .equals (string1.equals(string2)) or .equalsIgnoreCase

crimson ferry
#

(How) can I get how many people in a specific group are online rn?

turbid solar
#

Get users in the group then use your platform api to see if their online using uuid?

#

Was an example somewhere

fallow imp
#

How can I get the player's group expiry time?

#

If you have a answer for my question, Feel free to mention.

prime glacier
#

How can I get all members from a Group object?

obtuse jolt
prime glacier
#

thx

nocturne elbow
coarse python
#

I am so incredibly confused

#

I've added luckperms as a dependancy

#

but I can't use it even after reloading gradle

#

nvm, I invalidated caches

mortal berry
#

I need to give a couple of Bungee perms sync on PostLogin. How do I do that?

nocturne elbow
#

Exactly like you would do it elsewhere

slate orchid
#

How can i add permission to player with API?

frank driftBOT
flint vine
#

is this are going to return the high wight group ?
what about if the player have 2 groups with the same wight ?

nocturne elbow
#

is this are going to return the high wight group ?
by default, yes

what about if the player have 2 groups with the same wight ?
not super defined I believe, some times I've seen groups with the same weight being ordered alphabetically, some other times I have not ĀÆ\_(惄)_/ĀÆ

flint vine
#

Thank you emilyy

obtuse jolt
#

probably just based on what comes first in the memory mapping ig

flint vine
#

hello, i did try to use LuckPermis events and i load the example
but there is class named (MyPlugin) i didn't found any why to imported.

nocturne elbow
#

It's an example

#

You are supposed to take it as guidance, not copy/paste it lol

#

"MyPlugin" is your plugin class that extends JavaPlugin if you're on Bukkit

flint vine
#

i understand now thank you and sorry for misunderstanding .

woven thicket
#

How can I add a parent to a player with the API?

obtuse jolt
nocturne elbow
#

dammit ben i just woke up was gonna paste it

obtuse jolt
#

šŸ˜‰

woven thicket
#

does this add a group, or does this set the group as the only one?

turbid solar
#

Set as only one

woven thicket
#

And how can I add a parent / group?

turbid solar
#

Remove line 59

woven thicket
#

Should I
user.data().clear(NodeType.INHERITANCE::matches);remove this ^

turbid solar
#

Yes

woven thicket
#

Ok thx

flint vine
#

why

LuckPermsProvider.get().getUserManager().getUser(p.getUniqueId()).setPrimaryGroup(args[0]);

not working ?

nocturne elbow
#

Changing the primary group ≠ changing the parent groups