#luckperms-api
1 messages · Page 32 of 1
Sorry! I do not understand the command !rank
Type !help for a list of commands.
Sorry! I do not understand the command !rank
Type !help for a list of commands.
Indeed _11. But I’d say that reading someone else’s code when you have what it requires can be a good way of learning.
Yes I agree, I learned quite a bit that way myself
Reading someone elses code is fine as long as you understand what is happening in there
yeah as long as you understand the code, reading code is a fairly decent way to learn
can I dm BrainStone for support
yea ik
I think yhat answers your question
Sorry! I do not understand the command !rank
Type !help for a list of commands.
what is the command
!api the javadocs are linked here somewhere
Learn how to use the LuckPerms API in your project.
If you don't need to interact with LP specifically, using vault might be a easier way of doing that
so using papi is what ur saying
Papi =/= vault, but that could work as well
That is, assuming you are only trying to read basic meta and nothing else
im just trying to get the users prefix of their rank
Yeah PAPI or vault would be much simpler
do you know if papi has a dep
yes
dep info here, scroll down for how to set placeholders
i already know how to do the placeholders ive used papi before
I can just do String prefix = PlaceholderAPI.setPlaceholders(player, "%vault_prefix%");
that would work, although not the best way to do it
(i.e. requires server have the vault expansion)
This feels like a job better suited for vault
Well since in that example you're just storing the prefix, yeah, vault would be better. PAPI is more for user input
I'm not sure your use case so I can't give you better advice
hm
am I suppose to put a verison in here me.clip:placeholderapi:{VERSION}
where it says version
Yes
ok i put 2.10.9
@rigid void just use vault
Not really?
I'm telling you, using vault is better, simpler and faster
?
nvm
i will just search it up my self
myself *
this is it right https://www.vaultproject.io/api
That's the wrong vault @rigid void
@sturdy niche yes but we're not spoonfeeding you
with that stil
i found the one i think
I legit have no qlue what to do
That look right
would i just get their prefix from checking permissions
explain what your trying to do stillaugamer
If you can't piece together how to initialize a variable from example code, no one can help you @sturdy niche
Except of course they give you the code but that's kinda pointless
Brain do you know why i got no lib folder
Where?
@sturdy niche whats the problem?
Cant get the API to work
because?
You need to give context @rigid void. Keep in mind I can't see your screen. I have no idea what you're doing unless you tell me
if(provider !=null) {
LuckPerms api = provider.getProvider();
}```
Something with this and the LuckPerms api = bla bla
What does line 3 do here?
nothing :)
I exportedmy jar and should be in a lib folder but there is no lib folder
@sturdy niche incorrect
It does 3 things
And frankly if you can't figure out at least two, you are no where near ready to work on Minecraft plugins
line 3 check if provider is not null
The one below. The one you meant is line 2.
oh
But I'm not asking you 😉
And well since I don't know your setup, I can't help with that
I wanna go back to eclipse but my stupid school forcing me to use intellij
Trust me IJ is better than eclipse
thats a thing?
I pay for ultimate
anyways
Where does my jar file go i dont see a lib folder
What build system?
gradle
uh I'm a maven user mostly
woop
@wild whale use gradle. It's better
If you're building with gradle the files end up in builds/libs
That is?
Then it didn't build properly
3:34:49 p.m.: Executing tasks ':classes :testClasses'...
Task :compileJava UP-TO-DATE
Task :processResources UP-TO-DATE
Task :classes UP-TO-DATE
Task :compileTestJava NO-SOURCE
Task :processTestResources NO-SOURCE
Task :testClasses UP-TO-DATE
BUILD SUCCESSFUL in 301ms
2 actionable tasks: 2 up-to-date
3:34:49 p.m.: Tasks execution finished ':classes :testClasses'.
Yeah I've been doing a bunch of contributing to Vic's CarbonChat, and yeah I'm considering switching
./gradlew build
in ctrl ctrl?
What?
run anything
eh
I'd recommend the build task, as that also runs tests if present
where is that located
Where is what located?
build task
ah
If you're running it from the command line it's <gradle-command> build
yea idk what im doing i dont use intellij
If you're using IJ's gui stuff, I'd suggest making a run config of gradle build, like I have. (ignore the fact that I have my docker DevServer config selected) https://i.imgur.com/myAK0U3.png
Yes, build
owo deleted
I mean how did you run the other tasks?
what other tasks
3:34:49 p.m.: Executing tasks ':classes :testClasses'...
BUILD SUCCESSFUL in 301ms
2 actionable tasks: 2 up-to-date
3:34:49 p.m.: Tasks execution finished ':classes :testClasses'.
@rigid void those
You had ran the classes task earlier
i just hit run build
Where?
You said something about an export button?
no
its fixed
which event is the one that is broadcasting:
try it and see, as we said yesterday
listen to all three, print something unique when each happens
I've tried them
But?
My plugin is loading after LuckPerms (LuckPerms is a depend of my plugin) and the LuckPermsProvider.get() is called on ServerConnectedEvent
Caused by: java.lang.IllegalStateException: The LuckPerms API is not loaded.
at net.luckperms.api.LuckPermsProvider.get(LuckPermsProvider.java:50) ~[?:?]
at net.capecraft.common.helpers.LuckPermsHelper.<clinit>(LuckPermsHelper.java:18) ~[?:?]
... 46 more
Is there anything massively obvious I should check
This is waterfall btw
obviously the api isnt loaded
See thats what I though
but, if LuckPerms loads before my plugin, surely it is?
or am i confused
Don’t shade the API in
ew

You have provided in your pom, right?
gradle ftw
Just to be sure: There are no LuckPerms classes in your plugin jar, right?
100%
@nocturne elbow no. In the onEnable or after
Can I see the code where you try to access it?
Well yea, after too ofc, just that idk when is it that event gets called
Just gonna say, Java isn't my strongest language. And I dont claim it to be so I apologise for messy code in advance
https://github.com/CapeCraft/capecraft-proxy/blob/v2/waterfall/src/main/java/net/capecraft/waterfall/events/AfkEventHandler.java#L17
calls
https://github.com/CapeCraft/capecraft-proxy/blob/6ac211fef8e2fa8d78cc3955dbb0dc714ab8c808/waterfall/src/main/java/net/capecraft/waterfall/helpers/AfkHelper.java#L188
Calls
https://github.com/CapeCraft/capecraft-proxy/blob/v2/common/src/main/java/net/capecraft/common/helpers/LuckPermsHelper.java#L62
Top is the Waterfall Event, bottom is the LuckPerms api helper thingy
Alright. You’re initializing that class before your on enable
Or more specifically you’re initializing the API instance by referencing the class before your on enable
The easiest way to fix this if you’re not too experienced with initialization order in Java is to have an explicit method to initialize the API instance
And call that in your onEnable
You’re welcome
and in onEnable() i did a
LuckPermsHelper.setApi();
which is a
public static void setApi() {
luckPermsApi = LuckPermsProvider.get();
}
@tardy quail can you try just your plugin and LuckPerms?
Will do
Ah
so
My plugin depends on AdvancedBan and TAB
Thats min I can go right now unfortunately
And I'm not calling LuckPermsHelper anywhere before it, slightly confusing.
I'll push my latest code
@tardy quail one thing you can try: Change the list format in your bungee.yml: depends: [TAB, LuckPerms]
Oh and defining commands in the bungee.yml isn’t supported
Trying to perform a permission check in BungeeCord API but it is not succeeding: https://github.com/lucko/LuckPerms/wiki/Developer-API:-Usage#performing-permission-checks
Using this ^
This is my code: https://hastebin.com/iladuperap.java
@crystal sonnet After taking a look at it in the morning with a fresh pair of eyes. I realised I set LuckPerms API to compile instead of it being provided. Sorry for wasting your time
Hey james090500! Please don't tag helpful/staff members directly.
@tardy quail I’m happy you fixed it. But so much for 100% certainty, that it’s not in the jar file...
Just saying there might have been a reason I asked you to check
Noted for the future. I really do appreciate your help though.
You’re welcome
so i am making a simple command to literally just show groups inherited, on my dev server having a QueryOptions of the servers static context and everything turned on except for RESOLVE_INHERITANCE works on my dev server and only shows the explicitly assigned groups. However, on the actual network that is not the case and it shows nothing. I cannot for the life of me figure out why that would be the case?
Are you by any chance using group assignments with contexts?
Then the queryoptions are set to exclude them
for example i have contexed groups and global ones and it still shows nothing
Try it with a few different query options just to be sure
hrm, the default one works fine, just it shows EVERYTHING lol, all the inherited stuff not just what's explicitly assigned
even if i grab the default and then convert to builder then slip inherit and back flag it then is just like ye nah u got no groups
except on my dev server where it does exactly what i wanted it to
Are you using the same LP version?
v5.1.17 on live, 5.1.93 on IDE. So no, though the owner updated them 2 days ago so i didnt think they were that old
im actually confused how he managed to grab such an old version even though the website only gives the latest now lol
oh
the sponge ORE page is outdated
thats where he got it
5.1.17 is the latest on ORE
ima swap that in and see if i get the same result as live
o ye thats broken like it was on live now
cheers
that was it
You're welcome
Hey
im trying to add a permission with server=x
Node.builder("hub.discovered." + s).withContext("server", "hub").build();```
would this be correct?
The thing is I'm not a compiler, nor a server
So before you ask, just test it
Much easier
All I can tell you is that it looks correct
thats all i needed
Which ultimately says nothing if it compiles
wasnt sure if that was how the withContext worked
I don't know either
Do you guys know ho to check if a player has a node?
I think it's explained well with the combined knowledge on both of these links
!api
Learn how to use the LuckPerms API in your project.
how can i get the default group rigisterd to the plugin?
GroupManager#getGroup(“default”) I think
ik that, but what if the default group is not called "default"?
LuckPerms provides a group that every player is added to upon joining the server, called default. You can use multiple methods to change the default group or change the name of it.
Its posible to change the name of default rank to another?
2- Why LuckPerms said in Spigot Pages that support minecraft 1.7 and it doesnt do it
!default
LuckPerms provides a group that every player is added to upon joining the server, called default. You can use multiple methods to change the default group or change the name of it.
!downloads use the legacy version for 1.7.10 @ancient sable
You can download LuckPerms for Bukkit/Spigot, BungeeCord, Sponge, Nukkit and Velocity.
Also wrong channel. #support-1 or #support-2
no mater the name of the default group, how can i use the api to get the name of the default group?
It is always called 'default'
HowM
!default
LuckPerms provides a group that every player is added to upon joining the server, called default. You can use multiple methods to change the default group or change the name of it.
@nocturne elbow can you please explain to me how to change it
oh wait... nvm, i see that i messed up
!api
Learn how to use the LuckPerms API in your project.
!prefix
You can set prefixes, suffixes and other meta data in LuckPerms for players and groups. Note that LuckPerms does not manage chat. You need to use another plugin to show prefixes/suffixes in chat.
!help
!advanced
!api
!argumentbased
!ask
!bulkupdate
!bungee
!cauldron
!chat
!colours
!commandequivalents
!commands
!config
!context
!default
!downloads
!editor
!errors
!essentials
!extensions
!extracontexts
!faq
!helpchat
!inheritance
!install
!locale
!meta
!migration
!notworking
!nowildcard
!pasteit
!permissions
!placeholders
!selfhosting
!stacking
!storage
!suggestions
!switchstorage
!sync
!tracks
!upgrade
!usage
!userinfo
!verbose
!weight
!whyluckperms
!wiki
!ask xD
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!
!permissions
A list of permissions used by LuckPerms commands.
!verbos
Sorry! I do not understand the command !verbos
Type !help for a list of commands.
!verbose
LuckPerms provides a verbose command to help you find out what permissions a command/plugin is checking.
!api
Learn how to use the LuckPerms API in your project.
Save the user
how
UserManager#saveUser?
What is it you're trying to achieve? Because changing the primary group might or might not work based on the primary group calculation setting
I will try to give the player a specific group when he reached a specific played Time
and the setPrimaryGroup method is the only thing that didnt work
Because changing the primary group might or might not work based on the primary group calculation setting
Either that or just warn the user that the primary group won't be changed due to the current weights set up, idk 🤷♂️
Does luckperms have the ability to self promote by completing certain goals or is there a plugin i must use with it?
You'll need to use a plugin along with it
any suggestion on what plugin i might be able to use?
can two more more prefix show next to each other to indicate they are in multiple tracks?
!stacking
Display multiple prefixes/suffixes alongside a player's name.
ty
Either that or just warn the user that the primary group won't be changed due to the current weights set up, idk 🤷♂️
@nocturne elbow So is there any way to set the users group by using the Dev API
Without removing the other parent groups?
Yes so there is a method for it xD
Is there?
yes user.setPrimaryGroup
No, that's not so set/add a new parent group. That's to set the primary group which again might not work depending on the setting I linked above
It's even specified in the javadocs that it might not work
ok
What you want is to getData from the user (specifically the inheritance nodes), it'll give you a NodeMap (https://javadoc.io/static/net.luckperms/api/5.1/net/luckperms/api/model/data/NodeMap.html), clear the other parent groups node and add the node you want
What I don't know is if that getData resolves inherited nodes
Which wouldn't be ideal
can you send an example code so I dont know how to do that
okay
Roam around the javadocs, they are of great help
I'll try it
yeah i figured it out by the link
thank you for the link
now im having to figure out how to self promote using promotionsessentials
question. is prefix.0.{randomname} considered a permission line?
Like is it a permission like any other permission.
yeah it's a node to luckperms. Through vault it's a prefix though
Gotcha
Hey, how do I give a player a permission, using LP's api? 
!codebook
Sorry! I do not understand the command !codebook
Type !help for a list of commands.
thanks a lot 
is there a way to implement this in a gui plugin as an event or is this mainly for creating commands with these functions?
essentially, I want to give the permission on an InventoryClickEvent
What you want is to getData from the user (specifically the inheritance nodes), it'll give you a NodeMap (https://javadoc.io/static/net.luckperms/api/5.1/net/luckperms/api/model/data/NodeMap.html), clear the other parent groups node and add the node you want
@nocturne elbow Ive found a very simple solution I run the right lp command with the CondoleCommandSender so I dont need the API for this
@azure latch what do I cast as the LP User? Tried casting e.getWhoClicked(); but realized quickly, when trying the plugin in-game, that that wasn't the way to go 
Hello, I have problem with the temporary groups. My players can win temporary ranks and the problem is, when you win the highest rank, then the old ranks are still running out.
I checked the javadocs out, is it this event: GroupDataRecalculateEvent or UserDataRecalculateEvent? How often get the data recalculate, every tick? Or is there a other solution?
@nocturne elbow Ive found a very simple solution I run the right lp command with the CondoleCommandSender so I dont need the API for this
That is literally the worst way I could have thought of lmao
@mellow igloo you don't need the LP user for that? Also you don't cast Player to User anyway
Oh wait that’s right, mb 😅
@jolly jewel why don’t you make the higher groups inherit the lower ones?
@crystal sonnet I have this, but Im talking about temporary groups.
Hey ludgart! Please don't tag helpful/staff members directly.
I don’t see the issue
So you want to prevent lower groups from expiring if the player has a higher group, right? @jolly jewel
yes BrainStone
Then why don’t you just have the higher groups inherit the lower ones?
Then it won’t matter if they expire
As they are still applied through the higher group
My higher groups inherit from the lower ones. Here in the picture: https://gyazo.com/836ff758c8eb3e3697b1b83970c80b34 you see that both groups are expiring. In this scenario, the temp. rank cookie should freeze until biscuit expired.
And how I should do that dynamic? The only right way is to code a plugin, but i dont know which listener.
User user = PermissionUtils.loadUser(player);
String prefix = user.getCachedData().getMetaData().getPrefix();
prefix is null for me. i checked cacheddata and metadata they are not null. i do have a prefix. does anyone know why it's null?
Isn't getCachedData only for the holder's direct nodes and not inherited ones? 🤔
@nocturne elbow i have no idea. do you know a way i can get someone's prefix
what??
what
I need to get a prefix of someone
user.resolveInheritedNodes(NodeType.PREFIX, QueryOptions.nonContextual())
It'll give you a PrefixNode
can i cast that into a string or
user.resolveInheritedNodes(NodeType.PREFIX, QueryOptions.nonContextual()).getMetaValue()```
Which API version are you compiling against?
5.1
Well I bet my balls it does exist, try casting the node to a PrefixNode and then call getMetaValue
String prefix = (PrefixNode) user.resolveInheritedNodes(NodeType.PREFIX, QueryOptions.nonContextual().getMetaValue();
oh wait i think i forgot a )
oh still doesnt work
here i fixed it String prefix = (PrefixNode) user.resolveInheritedNodes(NodeType.PREFIX, QueryOptions.nonContextual()).getMetaValue();
((PrefixNode) user.resolveInheritedNodes(NodeType.PREFIX, QueryOptions.nonContextual())).getMetaValue()
javadocs be like
@nocturne elbow it is null
i have prefix set too https://joshios.is-inside.me/KlYsCNg5.png
What's your end goal? I wonder if vault might be easier
Wait I'm stupid
I'm creating my own chat handler (with multiple channels)
resolveInheritedNodes doesn't give you a node
it gives you a collection of nodes
you'd need to iterate through them till you find the first one that isn't null
Don't worry, they are in order of inheritance and weights and whatnot
if you're doing a chat plugin vault might be better
could i go like
for (value : user.resolveInheritedNodes(NodeType.PREFIX, QueryOptions.nonContextual())) {
// if it isnt null check here
}
No, don't cast to PrefixNode..
for (PrefixNode node : blahblah) {
if (node != null) {
return node.getMetaValue();
}
}
idk
I reckon that should do
let me try
public static String getPrefix(User user) {
for (PrefixNode node : user.resolveInheritedNodes(NodeType.PREFIX, QueryOptions.nonContextual())) {
if (node != null) {
return node.getMetaValue();
}
}
}
I wrote this but i have to make it actually return it to the function @nocturne elbow
?
Make sure that after the loop, in case no non-null prefix nodes were found, return something else
like
null
kek
just returned ""
kewl
@merry marten do you want to get the prefix value of nodes or do you want to get the prefix of the player?
I want the prefix of the player
Or do you want the actual prefix the player has
i think that's what i got (hopefully)
Ok
actual prefix
what's the difference
Whit what you're doing you get all prefixes the player inherits
Essentially you're getting what shows with /lp user <user> meta info
Now I think you want the resolved and calculated user prefix. Including things like prefix stacking etc
Meaning what shows when you run /lp user <user> info
Then the user doesn't have one active
wait does that mean like a self assigned prefix?
You want
User user = api.getUserManager().getUser(player/uuid);
String prefix = user.getCachedData().getMetaData(api.getContextManager().getQueryOptions(user)).getPrefix();
wait does that mean like a self assigned prefix?
@merry marten No. The prefix LuckPerms thinks the player has
what's the difference im confused
This includes inheritance, respects contexts, includes prefix stacking
can't you do api.getPlayerAdapter(Player.class).getMetaData(player).getPrefix() in 5.1 or is that different?
Yes you can do that too
My code is 5.0
I mean it still works on 5.1 ¯_(ツ)_/¯
That's why I never bothered updating
I might need some help. I basically want to get the permission of an offline player:
User user = api.getUserManager().loadUser(uuid).get();
^Can the user returned by this be null?
Tristate result = user.getCachedData().getPermissionData().checkPermission(chatPermission);
^Is there a non-tristate way, when does Tristate.UNDEFINED happen?
^Is this the correct and "fastest/most efficient" way of getting to the permission checking?
It can never be null @royal fable
And the tristate has a to Boolean conversation
Undefined means that there’s no permission node that applies to the permission
Ahh thank you! Then I can simplify my code a bit.
You’re welcome
When importing the LuckPerms API to IntelliJ, do I not need to add something to the repositories section of the pom? 🤔
No. It's on maven central @mellow igloo
ah okay, what does that imply? I apologize for the rookie question, I'm rather new to plugin development.
Maven central is a repository that is included automatically by all maven projects
ah alright, makes sense
Should I be alright just adding that directly in the pom or am I missing some other set up steps? Getting this error when adding it to the pom 🤔
Wait, nvm, seemed to be fixed with a restart of intellij. Might've been some issue with the auto import I guess.
👍🏼
And thanks for the assistance and information!
You're welcome
I thought IJ had removed autoimport? Could be going crazy though
@mellow igloo after changing your pom file in intellij there should be a little floating m button in the top right of the code space click that and it will import all the changes instead of having to restart intellij
^
Ahh alright, thank you! 🙌
Would this be the appropriate way of getting a user's parent groups in a CompletableFuture? 🤔 Or is there a "better way"?
public CompletableFuture<Collection<String>> getParentGroups(final OfflinePlayer player) {
return userManager.loadUser(player.getUniqueId(), player.getName())
.thenApplyAsync(user -> user.getNodes(NodeType.INHERITANCE))
.thenApplyAsync(nodes -> nodes.stream()
.map(InheritanceNode::getGroupName)
.collect(Collectors.toList()));
}
I mean it for sure does compile because, well, it does lmao, not asking if it would work, but if there's a "better" (maybe simpler?) way.
@nocturne elbow API 5.1?
Yep
Ok. Then the user object has a method to get the parents @nocturne elbow
Direct parents?
Learn how to use the LuckPerms API in your project.
Let me check
I need the direct parents tho, that's why. I think I did see something that gives me all the parent groups, but it gives me all the parent groups, directly or indirectly inherited
One sec
public CompletableFuture<Collection<String>> getParentGroups(final OfflinePlayer player) {
return userManager.loadUser(player.getUniqueId(), player.getName())
.thenApplyAsync(user -> user.getInheritedGroups(user.getQueryOptions().toBuilder().flag(Flag.RESOLVE_INHERITANCE, false).build()))
.thenApplyAsync(groups -> groups.stream()
.map(Group::getName)
.collect(Collectors.toList()));
}
@nocturne elbow
Looks like it'd work
Any benefits or downsides you can think of over the other method?
I looked everywhere but i don't find where to get the prefix of a player
Because it's an Optional
You might be able to add .orElse(api.getContextManager().getStaticQueryOptions()) to resolve it
!api shpould be this page
Learn how to use the LuckPerms API in your project.
oh yes it works fine thx!
And yes Brain I know 🥄
is it possible to get a user's group within a specific track?
val track = api.trackManager.getTrack("default") ?: return 0
val trackGroups = track.groups
```i have this. but say the user is in group `vip` and `dealer`, and `dealer` is in the track but `vip` has a higher weight
how can i make it return dealer?
wait i have an idea
oh it involves getting the players group which then uses the exact same method as my original code
no point using the API then
filter for the group? if you know which group you need, that is
i dont know which group
@nocturne elbow it resolves groups etc as LP itself does
@amber helm if you use the 5.1 API you can just use user.getQueryOptions()
This one specifically
So when people ping me and I'm ""busy"", I send the emote lmao

Just ask them to not ping you?
That takes the fun away, *sigh*...
is luckperms updated to 1.16.2?
mhmm tbh it doesnt really need an update anyways for 1.16.2 support
You could run an old 5.0 version on 1.16.2
if i have the perm node essentials.* and i put -essentials.list.hidden that rank cant see the hidden list?
No, you don't put - in front, you set the node to false
Also this is the wrong channel. @wooden pelican please read the channel descriptions before posting
ok
val api = provider?.provider ?: return
api.userManager.modifyUser(uuid) { user: User ->
// ...
}
"Unresolved reference: modifyUser"
LuckPerms api = LuckPermsProvider.get();
api.getUserManager().modifyUser(uuid, (User user) -> {
// ...
}
```worked in java
oh god kotlin
oh god
@nocturne elbow u what
😢
@warm garnet make sure you’re using API version 5.1
thanks
Hey guys, I'm trying to use luckperms as a means of storing a short string as a permission node as meta for users,
example: I'd like to store myplugin.setting.blah, where myplugin.setting would be the "key" and "blah" would be the value.
Using a RegexPermissionNode I can resolve weather or not myplugin.setting.* exists for a user, but it's unclear to me how I could resolve the "value" (blah in this case) from a RegexPermissionNode
does anyone have experience in this kinda thing?
Just use the existing meta system in LuckPerms? @digital wasp
Thanks for the suggestion! That works great.
I don’t suppose the max meta data size could be pushed higher? It seems the string caps out at 270 bytes
That would probably be something you should ask Luck on the repo issue tracker
!suggest
If you would like to request a feature for LuckPerms, or report a bug, feel free to open an issue on GitHub!
hello
guys i need help
I've downloaded luckperms bungee on my server, But i can't add perms to ranks
Like i have essentials plugin, when i do " /lpb group mod permission set essentials.fl " and click tab, It won't type " y " if it didnt that means if i typed it myself it wont work
I cant add perms to ranks
on bungee luckperms
How can i fix this thing?
I just can add " Luckperms. " perms
@thorny echo can i get help please?
Hey Suma! Please don't tag helpful/staff members directly.
First of all, that's not related to the developer API so the appropriate channel would be either #support-1 or #support-2 😛
Secondly, you still need to install LuckPerms on each of the backend spigot servers, LPB isn't a replacement for the whole network
Please see the name of this chat. This is for the developer API only. Additionally, don't tag staff.
From all platforms LuckPerms supports
@digital wasp regarding the limit:
Is it a for a single server or for general servers?
If it's your server and you're using MySQL/MariaDB as the database you can increase the max length
Well the limits arise from the limit of the column in the database
They also vary depending on the storage type as a result
for context: I'm storing a player nickname as a meta node to help propagate it between my server's custom plugins that need it; Normally this is fine but the new rgb color codes eat up a LOT of space
as the raw format is &x&r&r&g&g&b&b
(well, simeolon and not &, but same thing)
Just increase the length of the column
No of course not
And if in doubt that you migh lose your data, just make a backup
hello
how do i check player's group in LP-Api 5.1?
the syntaxes is very different from version 4
!api prob a good place to start
Learn how to use the LuckPerms API in your project.
Best to always use the latest that is avaliable.
use the latest version of LP then install the legacy API extension @fathom steppe
do i have to install the API To the server?
[10:29:05 ERROR]: Could not load 'plugins/extension-legacy-api-1.0.0.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:150) ~[patched_1.12.2.jar:git-Paper-1618]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136) ~[patched_1.12.2.jar:git-Paper-1618]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.loadPlugins(CraftServer.java:318) ~[patched_1.12.2.jar:git-Paper-1618]
at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:222) ~[patched_1.12.2.jar:git-Paper-1618]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:616) ~[patched_1.12.2.jar:git-Paper-1618]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_262]```
Fix this ASAP
@proud crypt
Hey RedEpic! Please don't tag helpful/staff members directly.
@unreal mantle
Hey RedEpic! Please don't tag helpful/staff members directly.
why would you tag me
did you even read the page i linked
@fathom steppe If you're actually adding the API into a plugin, you don't need that extension. It is much better if you use the API v5.
And that error is a problem with your plugin.yml...
Lost
how to get role of player the biggest priority using LuckPerms api?
How to set the primary group of an player?
What you want is probably change the parent group instead, or you actually want to change the primary group? Because a) those aren't the same and b) changing the primary group might actually not work at all (depending on the config)
ok
So you want to get the prefix of the group the player inherits, right?
Are you talking about the LP API?
Well your best bet would be to get the prefix through Vault honestly, and LP will take care of all the stacking (if any), weights and inheritances.
And also why did you remove your original message?
Their first message is an "ok"
ok so how do i add the prefix
So, you're using EssXChat to set the prefixes or are they stored with LP? (meta setprefix...)
But yes I agree @native thistle. Using Vault to get the prefix is typically the better idea as that makes your plugin then comptabile with most permission plugins
Google is a thing
VaultAPI
then what is the point comming here
We're not here to spoonfeed you answers. We're here to help you help yourself
And I've told you
The easiest way to get the player prefix is by using the VaultAPI
^
How you do that can be googled
Get the prefix
where is the prefix
Get an instance of Chat and get the prefix from it
No spoonfeeding fefo
Too much?
Waaay too much
bro
Getting the prefix is one of the first things they explain in their usage guides
Spoonfeed at your own risk, is probably a better policy Brain 
Actually trivial to google
@native thistle here https://github.com/MilkBowl/VaultAPI#implementing-vault
That's got all the answers
ok
I googled it so you didn't have to
ty
But now, since I went to levels of effort that you couldn't seem to, I can no longer help
No that's the wrong thing
I'm shocked
It's actually not trivial to google
That's an actual surprise
The actual worst documentation of a popular MC project I've seen in ages.
I'm shocked
My apologies
Almost every single minecraft project has like 3 ways of implementing and then using vault
Well how to include it in your project can be found here: https://github.com/MilkBowl/VaultAPI#vaultapi---abstraction-library-api-for-bukkit-plugins---
Then you get the Vault instance, get the Chat instance from that and there the method name should be selfexplanatory @native thistle
That's... the same link I sent just scrolled up 
It's a different section
On purpose
Ok. I take it back too @rustic laurel
That was the right thing
But WTF
Who on earth calls that "Implementing Vault"?
That's "Using Vault"
WTF
lool
LuckPerms implements Vault
they seem to be able to be synonymous in non-technical language
At least partially
implement = use in colloquial english
they seem to be able to be synonymous in non-technical language
Not that I'm aware of
but for a technical readme it should really be correct
like I could say "use/execute cmd.exe" or "implement cmd.exe" and while the second is more awkward, in some cases it can work
public class MyPlugin extends JavaPlugin {
private static Chat chat = null;
@Override
public void onEnable() {
if (!setupChat() ) {
log.severe(String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName()));
getServer().getPluginManager().disablePlugin(this);
return;
}
// Other stuff
}
private boolean setupChat() {
if (getServer().getPluginManager().getPlugin("Vault") == null) {
return false;
}
RegisteredServiceProvider<Chat> rsp = getServer().getServicesManager().getRegistration(Chat.class);
if (rsp == null) {
return false;
}
chat = rsp.getProvider();
return chat != null;
}
public static Chat getChat() {
return chat;
}
}
@native thistle put that into you main class accordingly
No spoonfeeding fefo
smh
Yes because the documentation is actually dogshit
it is lol
And it took me 5 minutes figuring it out
Bit more than a mess
Partially just plain wrong and badly designed
@native thistle then you can do MyPlugin.getChat() to get the chat instance and use that to get the prefix
I can't get over how terrible the documentation is here
Yes
That's copy pasted from their code
And while it's not good practice it's easier
And considering it's supposed to be easy
I mean, improper use of static is the way for non-knowledgeable people to easily share data between classes
Absolutely
No you need to depend on the VaultAPI in your plugin
what?
Essentially the same as depending on the LuckPerms API
im sorry i know how to make plugins
if you know how, then you should be able to depend on Vault
I'm starting to doubt that beyond a very very basic level, but ok, what's your point?
never used voult
The same way you use the Bukkit API, you'll use Vault API
this is my code rn
look how i added bukkit api is a downloaded spigot 1.14 and added it
Ever heard of gradle or Maven?
Good that we established that
Have you heard of Java
what is that
nooo nononononono nooooo
that's a gui that does coding for you
that's not coding
then wht is
maven or gradle, getting deps, using them, etc
no 
maven is probably what your GUI is using right now
okay
it just gets the name of jars you download and adds a codeblock into your pom.xml that looks like this https://i.imgur.com/i6viWUh.png
He used BuildTools (I presume) and added the final server jar as a dependency
With that "Add JARs" button right there
bro what do i need to downlowed so i can start using the code
@nocturne elbow is that buildtools? it lets you add things like JARs and variables and class folders?
it literally shades them in or something?
I-
why do you think spigot is there
This beyond messed up lol
@native thistle until you can use the kind of code Brainstone literally wrote for you, you wont be able to use vault
And maven
also maven
yes ik
You can literally not make anything Java (with any degree of efficiency) without knowing at least maven
especially minecraft plugins, which are literally hell to work on compared to really basic java
and you definitely cannot just download vault in buildtools and expect anything to work
@nocturne elbow
Hey Masked! Please don't tag helpful/staff members directly.
what works?
which code
jar into my built tool
no which code works
what are there 12 lines of random whitespace 😩
bro
All that space 😦
you have two onEnables
yes
you say you can make plugins but I'm concerned
well, try the code and see
it 99% will not work
Insanely basic java?
this hurts my brain
after we gave you that link, brainstone literally wrote out what it said to do in wonderful code, so you could use it as easily as possible
and then you paste that code in a random spot in your main class
he never said where to paste it
because you don't
you are expected to know enough java to use that code where you need to
if you don't literally nothing anyone can do can help you
Start with this -
https://docs.oracle.com/javase/tutorial/java/concepts/index.html
Breeze through this skipping stuff that doesn't seem relevant like bitwise operators-
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/index.html
and then hit this
https://docs.oracle.com/javase/tutorial/java/javaOO/index.html
i have override commands
They're the first three from this larger thing - https://docs.oracle.com/javase/tutorial/java/index.html
Which you should definitely go through overall. But those three should be enough for slightly better understanding of wtf is happening here without feeling like a huge time sink
That one is a small part of this larger site - https://docs.oracle.com/javase/tutorial/index.html
wherein "Essential Java Classes" and "Collections" also have good useful stuff
along with anything else you'd want of course
credit to mbax, where it is due
@rustic laurel that initial screenshot of the libraries is Eclipse's manual dependency jar management screen
what does it do?
ye
It let's you manually add jars to a project the code is being built against
No maven or anything
does similar things, though, right?
Kindaish
ah kk
Like you have to get the jars yourself
ok
i got it
public class Main extends JavaPlugin implements Listener {
private int taskID;
private static Chat chat = null;
@Override
public void onEnable() {
this.getServer().getPluginManager().registerEvents(this, this);
if (Bukkit.getOnlinePlayers().isEmpty())
for (Player online : Bukkit.getOnlinePlayers()) {
createBoard(online);
start(online);
if (!setupChat() ) {
log.severe(String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName()));
getServer().getPluginManager().disablePlugin(this);
return;
}
}
}```
And that's why it's not the bukkit or Spigot API but rather the entire Spigot jar and also not the Vault API jar but rather the vault plugin jar @rustic laurel . Because he downloaded them and added them as dependencies
is that good brainstone
No
what i doing wrong
Not trying to understand what the code does
he just added your onenable to his
Inside a for loop inside an if statement
yep
Like I mean I even added where the other code is supposed to go
words
"for" and "if" are pretty small words that mean pretty big things
yes sir
Go look at my code again
Find the comment
Read it
I don't think you are trying to understand anything here
my code was example code
That you should read
And use in your code
Not paste it in
Writing plugins requires a decent amount of programming knowledge
i started coding about 5 days ago and im not very well into this a made command plugins and a server selector for bungee cord
this is the code
of the
sidebar
You need around a year of solid java experience if you want to be able to make any decent plugin
Minecraft plugins are absolutely not the place to learn programming
Learn Java first.
That is hard enough
Congrats
i have son idea
Did you actually make it or did you copy paste it together?
And do you understand what the code does I gave you?
il show you my code
That does not answer my question
If you can't get this to work, impossibly hard
Like you won't be able to if you copy and paste things together
not for creating perms plugins lol
Because writing a permissions plugin requires you to understand what you're doing
And you are very clearly not
Take a look at the code - if you can understand it go ahead, but I definitely can't understand it 😂
Making plugins is very advanced
bro