#luckperms-api

1 messages · Page 32 of 1

rigid void
#

!rank

frank driftBOT
#

Sorry! I do not understand the command !rank
Type !help for a list of commands.

rigid void
#

oh 😦

#

!rank doc

frank driftBOT
#

Sorry! I do not understand the command !rank
Type !help for a list of commands.

lime rune
#

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.

wild whale
#

Yes I agree, I learned quite a bit that way myself

rigid void
#

Reading someone elses code is fine as long as you understand what is happening in there

wild whale
#

yeah as long as you understand the code, reading code is a fairly decent way to learn

rigid void
#

can I dm BrainStone for support

wild whale
rigid void
#

yea ik

wild whale
#

I think yhat answers your question

rigid void
#

ok so um

#

!rank docs

frank driftBOT
#

Sorry! I do not understand the command !rank
Type !help for a list of commands.

rigid void
#

what is the command

wild whale
#

!api the javadocs are linked here somewhere

frank driftBOT
wild whale
#

oh nvm pinned

rigid void
#

ah

#

potaot

#

not what im looking for

#

im trying to get the users rank prefix

wild whale
#

If you don't need to interact with LP specifically, using vault might be a easier way of doing that

rigid void
#

so using papi is what ur saying

wild whale
#

Papi =/= vault, but that could work as well

#

That is, assuming you are only trying to read basic meta and nothing else

rigid void
#

im just trying to get the users prefix of their rank

wild whale
#

Yeah PAPI or vault would be much simpler

rigid void
#

do you know if papi has a dep

wild whale
#

yes

#

dep info here, scroll down for how to set placeholders

rigid void
#

i already know how to do the placeholders ive used papi before

#

I can just do String prefix = PlaceholderAPI.setPlaceholders(player, "%vault_prefix%");

wild whale
#

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

rigid void
#

is it

#

though

wild whale
#

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

rigid void
#

hm

#

am I suppose to put a verison in here me.clip:placeholderapi:{VERSION}

#

where it says version

wild whale
#

Yes

rigid void
#

ok i put 2.10.9

crystal sonnet
#

@rigid void just use vault

rigid void
#

agh

#

why

#

its more work

crystal sonnet
#

Not really?

rigid void
#

with papi i can just add vault to papi and boom

#

done

crystal sonnet
#

Add the dependency and then you can just use it

#

You do you

rigid void
#

Yes I do me

#

I can't find my libs folder

crystal sonnet
#

I'm telling you, using vault is better, simpler and faster

rigid void
#

well rip

#

doc me Brain

crystal sonnet
#

?

rigid void
#

nvm

#

i will just search it up my self

#

myself *

sturdy niche
#

so 1 last time

#

do u guys want to help me or not

crystal sonnet
#

That's the wrong vault @rigid void

#

@sturdy niche yes but we're not spoonfeeding you

rigid void
#

with that stil

#

i found the one i think

sturdy niche
#

I legit have no qlue what to do

crystal sonnet
#

That look right

rigid void
#

would i just get their prefix from checking permissions

#

explain what your trying to do stillaugamer

crystal sonnet
#

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

rigid void
#

Brain do you know why i got no lib folder

crystal sonnet
#

Where?

lime rune
#

@sturdy niche whats the problem?

sturdy niche
#

Cant get the API to work

lime rune
#

because?

crystal sonnet
#

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

sturdy niche
#
        if(provider !=null) {
            LuckPerms api = provider.getProvider();
        }```
#

Something with this and the LuckPerms api = bla bla

crystal sonnet
#

What does line 3 do here?

sturdy niche
#

nothing :)

rigid void
#

I exportedmy jar and should be in a lib folder but there is no lib folder

lime rune
#

stilau send entire class

#

hastebin or smtng

crystal sonnet
#

@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

rigid void
#

line 3 check if provider is not null

crystal sonnet
#

The one below. The one you meant is line 2.

rigid void
#

oh

crystal sonnet
#

But I'm not asking you 😉

rigid void
#

from discord it looks like line 3

#

😢

crystal sonnet
#

It's ok

#

Stilau needs to be able to figure it out

rigid void
#

ok

#

Im actually gonna cancel my intellij subscription

crystal sonnet
#

And well since I don't know your setup, I can't help with that

rigid void
#

I wanna go back to eclipse but my stupid school forcing me to use intellij

wild whale
#

Trust me IJ is better than eclipse

sturdy niche
#

U wanna switch

#

to eclipse

#

!?

rigid void
#

yes

#

I started with that and I love it

#

_11 you use intellij?

wild whale
#

Yes

#

Ultimate edition cause education plans are great

rigid void
#

thats a thing?

#

I pay for ultimate

#

anyways

#

Where does my jar file go i dont see a lib folder

wild whale
#

What build system?

rigid void
#

gradle

wild whale
#

uh I'm a maven user mostly

rigid void
#

woop

crystal sonnet
#

@wild whale use gradle. It's better

rigid void
#

oh brain you know how to use gradle 🙂

#

I built my project where does it go

crystal sonnet
#

If you're building with gradle the files end up in builds/libs

rigid void
#

there is one issue thoug

#

though

#

there is no libs folder

crystal sonnet
#

That is?

rigid void
#

in bulds

crystal sonnet
#

Then it didn't build properly

rigid void
#

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'.

crystal sonnet
#

Ah

#

Run the build command

wild whale
#

Yeah I've been doing a bunch of contributing to Vic's CarbonChat, and yeah I'm considering switching

crystal sonnet
#

./gradlew build

rigid void
#

in ctrl ctrl?

crystal sonnet
#

What?

rigid void
#

run anything

crystal sonnet
#

Well I think you can select which tasks to run

#

Run the build or assemble task

rigid void
#

eh

crystal sonnet
#

I'd recommend the build task, as that also runs tests if present

rigid void
#

where is that located

crystal sonnet
#

Where is what located?

rigid void
#

build task

crystal sonnet
#

Where all other gradle tasks are located

#

I use gradle. Not intelliJ with gradle

rigid void
#

ah

crystal sonnet
#

If you're running it from the command line it's <gradle-command> build

rigid void
#

yea idk what im doing i dont use intellij

wild whale
#

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

rigid void
crystal sonnet
#

I mean how did you run the other tasks?

rigid void
#

what other tasks

crystal sonnet
#

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

wild whale
#

You had ran the classes task earlier

rigid void
#

i just hit run build

wild whale
#

Where?

rigid void
crystal sonnet
#

You said something about an export button?

rigid void
#

no

rigid void
#

its fixed

sturdy niche
rustic laurel
#

try it and see, as we said yesterday

#

listen to all three, print something unique when each happens

sturdy niche
#

I've tried them

crystal sonnet
#

But?

tardy quail
#

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

lime rune
#

obviously the api isnt loaded

tardy quail
#

See thats what I though

#

but, if LuckPerms loads before my plugin, surely it is?

#

or am i confused

crystal sonnet
#

Don’t shade the API in

tardy quail
#

It's not shaded

#

it's a depend

#

Using maven to get the API

lime rune
#

ew

tardy quail
drifting valley
#

You have provided in your pom, right?

lime rune
#

gradle ftw

tardy quail
nocturne elbow
#

Wouldn't you need to get it in onEnable?

#

Just asking

crystal sonnet
#

Just to be sure: There are no LuckPerms classes in your plugin jar, right?

tardy quail
#

100%

crystal sonnet
#

@nocturne elbow no. In the onEnable or after

#

Can I see the code where you try to access it?

tardy quail
#

Sure

#

Can I send you a github link

nocturne elbow
#

Well yea, after too ofc, just that idk when is it that event gets called

crystal sonnet
#

Alright. You’re initializing that class before your on enable

tardy quail
#

Am I ?

#

Oh!

#

Because the main? calls it

crystal sonnet
#

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

tardy quail
#

Ok I can do that

#

Thank you for your help

crystal sonnet
#

You’re welcome

tardy quail
#

and in onEnable() i did a
LuckPermsHelper.setApi();

#

which is a

public static void setApi() {
  luckPermsApi = LuckPermsProvider.get();
}  
nocturne elbow
#

TAB has a bungee version?

#

wut

crystal sonnet
#

@tardy quail can you try just your plugin and LuckPerms?

tardy quail
#

Will do

tardy quail
#

Ah

#

so

#

My plugin depends on AdvancedBan and TAB

#

Thats min I can go right now unfortunately

crystal sonnet
#

That’s fine too

#

I’d be shocked if they messed things up

tardy quail
#

And I'm not calling LuckPermsHelper anywhere before it, slightly confusing.

#

I'll push my latest code

crystal sonnet
#

Odd

#

It’s really late for me. I’ll get back to you in the morning

tardy quail
#

Thank you

#

It's almost 2am here too

crystal sonnet
#

@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

outer dock
#

Using this ^

outer dock
tardy quail
#

@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

frank driftBOT
#

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

crystal sonnet
#

@tardy quail I’m happy you fixed it. But so much for 100% certainty, that it’s not in the jar file...

tardy quail
#

Honestly im so sorry.

#

I was so tired last night

crystal sonnet
#

Just saying there might have been a reason I asked you to check

tardy quail
#

Noted for the future. I really do appreciate your help though.

crystal sonnet
#

You’re welcome

bold plover
#

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?

crystal sonnet
#

Are you by any chance using group assignments with contexts?

bold plover
#

yeah

#

bit of both

crystal sonnet
#

Then the queryoptions are set to exclude them

bold plover
#

for example i have contexed groups and global ones and it still shows nothing

crystal sonnet
#

Try it with a few different query options just to be sure

bold plover
#

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

crystal sonnet
#

Are you using the same LP version?

bold plover
#

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

crystal sonnet
#

Update

#

There were some bug fixes

bold plover
#

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

crystal sonnet
#

You're welcome

midnight escarp
#

Hey

#

im trying to add a permission with server=x

#
Node.builder("hub.discovered." + s).withContext("server", "hub").build();```
#

would this be correct?

crystal sonnet
#

Looks correct

#

Have you tried it?

midnight escarp
#

debugging making sure that was correct

#

havent messed with the new API that much

crystal sonnet
#

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

midnight escarp
#

thats all i needed

crystal sonnet
#

Which ultimately says nothing if it compiles

midnight escarp
#

wasnt sure if that was how the withContext worked

crystal sonnet
#

I don't know either

midnight escarp
#

Do you guys know ho to check if a player has a node?

rustic laurel
#

I think it's explained well with the combined knowledge on both of these links

#

!api

frank driftBOT
midnight escarp
#

oh thanks

#

did see that guide

nocturne elbow
#

how can i get the default group rigisterd to the plugin?

lime rune
#

GroupManager#getGroup(“default”) I think

nocturne elbow
#

ik that, but what if the default group is not called "default"?

rustic laurel
#

It's always called default

#

That part is hardcoded

nocturne elbow
#

oh

#

ok

#

!default

frank driftBOT
nocturne elbow
#

@nocturne elbow take a look at it 👆

#

ah

#

ok

ancient sable
#

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

crystal sonnet
#

!default

frank driftBOT
crystal sonnet
#

!downloads use the legacy version for 1.7.10 @ancient sable

frank driftBOT
crystal sonnet
ancient sable
#

I didnt know im which channel to ask

#

sorry my dear

nocturne elbow
#

no mater the name of the default group, how can i use the api to get the name of the default group?

rustic laurel
#

It is always called 'default'

nocturne elbow
#

no...

#

it can be changed

ancient sable
#

HowM

nocturne elbow
#

!default

frank driftBOT
ancient sable
#

What that green line?

#

I dont understand that

rustic laurel
#

@nocturne elbow can you please explain to me how to change it

nocturne elbow
#

oh wait... nvm, i see that i messed up

rustic laurel
#

!api

frank driftBOT
nocturne elbow
#

!prefix

frank driftBOT
jovial cave
#

!help

frank driftBOT
#
Available commands:

!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

jovial cave
#

!ask xD

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!

Why shouldn't I ask to ask?
jovial cave
#

!permissions

frank driftBOT
jovial cave
#

!verbos

frank driftBOT
#

Sorry! I do not understand the command !verbos
Type !help for a list of commands.

jovial cave
#

!verbose

frank driftBOT
forest zealot
#

!api

frank driftBOT
snow willow
#

the user.setPrimaryGroup() method do not work for me

#

did anyone know why

nocturne elbow
#

Save the user

snow willow
#

how

nocturne elbow
#

UserManager#saveUser?

snow willow
#

oh okay thanks

#

it still dont work

nocturne elbow
#

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

snow willow
#

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

nocturne elbow
#

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 🤷‍♂️

thorn snow
#

Does luckperms have the ability to self promote by completing certain goals or is there a plugin i must use with it?

rustic laurel
#

You'll need to use a plugin along with it

thorn snow
#

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?

sudden pelican
#

!stacking

frank driftBOT
thorn snow
#

ty

snow willow
#

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

nocturne elbow
#

Without removing the other parent groups?

snow willow
#

It doesnt matter

#

So I only will set a higher wieghted group

#

*weighted

nocturne elbow
#

🤷‍♂️

#

But I mean, there's got to be a way

snow willow
#

Yes so there is a method for it xD

nocturne elbow
#

Is there?

snow willow
#

yes user.setPrimaryGroup

nocturne elbow
#

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

snow willow
#

ok

nocturne elbow
#

What I don't know is if that getData resolves inherited nodes

#

Which wouldn't be ideal

snow willow
#

can you send an example code so I dont know how to do that

nocturne elbow
#

I can't

#

lol

snow willow
#

okay

nocturne elbow
#

Roam around the javadocs, they are of great help

snow willow
#

I'll try it

thorn snow
#

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?

nocturne elbow
#

Permission line?

#

Wut

thorn snow
#

Like is it a permission like any other permission.

rustic laurel
#

yeah it's a node to luckperms. Through vault it's a prefix though

thorn snow
#

Gotcha

mellow igloo
#

Hey, how do I give a player a permission, using LP's api? PepeThonk

azure latch
#

!codebook

frank driftBOT
#

Sorry! I do not understand the command !codebook
Type !help for a list of commands.

azure latch
mellow igloo
#

thanks a lot LitwickThumbsUp

#

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

azure latch
snow willow
mellow igloo
#

@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 PepeYikes

jolly jewel
#

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
#

@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

azure latch
#

@mellow igloo you don't need the LP user for that? Also you don't cast Player to User anyway

mellow igloo
#

Oh wait that’s right, mb 😅

crystal sonnet
#

@jolly jewel why don’t you make the higher groups inherit the lower ones?

jolly jewel
#

@crystal sonnet I have this, but Im talking about temporary groups.

frank driftBOT
#

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

crystal sonnet
#

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

jolly jewel
#

yes BrainStone

crystal sonnet
#

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

jolly jewel
crystal sonnet
#

Ah. So you want to freeze the timer

#

Well why don’t you just add to the timer?

jolly jewel
#

And how I should do that dynamic? The only right way is to code a plugin, but i dont know which listener.

merry marten
#
        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?

nocturne elbow
#

Isn't getCachedData only for the holder's direct nodes and not inherited ones? 🤔

merry marten
#

@nocturne elbow i have no idea. do you know a way i can get someone's prefix

merry marten
#

what??

nocturne elbow
#

what

merry marten
#

I need to get a prefix of someone

nocturne elbow
#

yea

#

you can do with that

#

prefixes are nodes

merry marten
#

ok im confused

#

the only data i have is User

nocturne elbow
#

user.resolveInheritedNodes(NodeType.PREFIX, QueryOptions.nonContextual())

#

It'll give you a PrefixNode

merry marten
#

can i cast that into a string or

nocturne elbow
#

No...

#

It's a node

merry marten
#

I need to get the string of the prefix

#

not the node

nocturne elbow
#

Read the javadocs

merry marten
#
user.resolveInheritedNodes(NodeType.PREFIX, QueryOptions.nonContextual()).getMetaValue()```
nocturne elbow
#

ya

#

That should do

merry marten
#

let me try

#

getMetaValue does not exist apparently

nocturne elbow
#

Which API version are you compiling against?

merry marten
#

5.1

nocturne elbow
#

Well I bet my balls it does exist, try casting the node to a PrefixNode and then call getMetaValue

merry marten
#
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();

nocturne elbow
#

((PrefixNode) user.resolveInheritedNodes(NodeType.PREFIX, QueryOptions.nonContextual())).getMetaValue()

merry marten
#

ah that works

#

let me try it in game

nocturne elbow
merry marten
#

@nocturne elbow it is null

wild whale
#

What's your end goal? I wonder if vault might be easier

nocturne elbow
#

Wait I'm stupid

merry marten
#

I'm creating my own chat handler (with multiple channels)

nocturne elbow
#

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

wild whale
#

if you're doing a chat plugin vault might be better

merry marten
#

could i go like

for (value : user.resolveInheritedNodes(NodeType.PREFIX, QueryOptions.nonContextual())) {
  // if it isnt null check here
}
nocturne elbow
#

No, don't cast to PrefixNode..

merry marten
#

oh

#

but other than that would it work

nocturne elbow
#
for (PrefixNode node : blahblah) {
  if (node != null) {
    return node.getMetaValue();
  }
}
#

idk

#

I reckon that should do

merry marten
#

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

nocturne elbow
#

?

#

Make sure that after the loop, in case no non-null prefix nodes were found, return something else

#

like

#

null

#

kek

merry marten
#

just returned ""

nocturne elbow
#

or an empty string, idk

#

whatever fits your needs

merry marten
#

It works <3

#
16.08 18:47:50 [Server] INFO &e(&cG&e)
nocturne elbow
#

kewl

crystal sonnet
#

@merry marten do you want to get the prefix value of nodes or do you want to get the prefix of the player?

merry marten
#

well I think I just got the prefix of the player did i not?

#

i think

crystal sonnet
#

I'm asking what you want

#

Do you really want the value of the prefix nodes?

merry marten
#

I want the prefix of the player

crystal sonnet
#

Or do you want the actual prefix the player has

merry marten
#

i think that's what i got (hopefully)

crystal sonnet
#

Ok

merry marten
#

actual prefix

crystal sonnet
#

No you're getting the values of the prefix nodes

#

One sec

merry marten
#

what's the difference

crystal sonnet
#

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

merry marten
#

it says none

#

to the prefix when i check it there

crystal sonnet
#

Then the user doesn't have one active

merry marten
#

wait does that mean like a self assigned prefix?

crystal sonnet
#

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

merry marten
#

what's the difference im confused

crystal sonnet
#

This includes inheritance, respects contexts, includes prefix stacking

sudden pelican
#

can't you do api.getPlayerAdapter(Player.class).getMetaData(player).getPrefix() in 5.1 or is that different?

crystal sonnet
#

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

royal fable
#

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?

crystal sonnet
#

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

royal fable
#

Ahh thank you! Then I can simplify my code a bit.

crystal sonnet
#

You’re welcome

mellow igloo
#

When importing the LuckPerms API to IntelliJ, do I not need to add something to the repositories section of the pom? 🤔

crystal sonnet
#

No. It's on maven central @mellow igloo

mellow igloo
#

ah okay, what does that imply? I apologize for the rookie question, I'm rather new to plugin development.

jaunty pecan
#

Maven central is a repository that is included automatically by all maven projects

mellow igloo
#

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.

crystal sonnet
#

👍🏼

mellow igloo
#

And thanks for the assistance and information!

crystal sonnet
#

You're welcome

wild whale
#

I thought IJ had removed autoimport? Could be going crazy though

dusky fern
#

@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

wild whale
#

^

mellow igloo
#

Ahh alright, thank you! 🙌

nocturne elbow
#

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.

crystal sonnet
#

@nocturne elbow API 5.1?

nocturne elbow
#

Yep

crystal sonnet
#

Ok. Then the user object has a method to get the parents @nocturne elbow

nocturne elbow
#

Direct parents?

crystal sonnet
#

All of them

#

!api

frank driftBOT
crystal sonnet
#

Let me check

nocturne elbow
#

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

crystal sonnet
#

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

nocturne elbow
#

Looks like it'd work

#

Any benefits or downsides you can think of over the other method?

amber helm
#

I looked everywhere but i don't find where to get the prefix of a player

amber helm
#

thx

#

why do i have this error ?

neat jackal
#

Because it's an Optional

#

You might be able to add .orElse(api.getContextManager().getStaticQueryOptions()) to resolve it

#

!api shpould be this page

frank driftBOT
amber helm
#

oh yes it works fine thx!

neat jackal
#

And yes Brain I know 🥄

warm garnet
#

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

rustic laurel
#

filter for the group? if you know which group you need, that is

warm garnet
#

i dont know which group

crystal sonnet
#

@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()

nocturne elbow
#

I need a ping emote

#

Or nitro

#

Preferably the latter

crystal sonnet
#

What do you mean?

#

Or why?

nocturne elbow
#

So when people ping me and I'm ""busy"", I send the emote lmao

rustic laurel
crystal sonnet
#

Just ask them to not ping you?

nocturne elbow
#

That takes the fun away, *sigh*...

thin crescent
#

is luckperms updated to 1.16.2?

obtuse jolt
#

mhmm tbh it doesnt really need an update anyways for 1.16.2 support

crystal sonnet
#

You could run an old 5.0 version on 1.16.2

wooden pelican
#

if i have the perm node essentials.* and i put -essentials.list.hidden that rank cant see the hidden list?

nocturne elbow
#

No, you don't put - in front, you set the node to false

wooden pelican
#

Oh

#

thx

crystal sonnet
#

Also this is the wrong channel. @wooden pelican please read the channel descriptions before posting

wooden pelican
#

ok

warm garnet
#
val api = provider?.provider ?: return
api.userManager.modifyUser(uuid) { user: User ->
    // ...
}
#

"Unresolved reference: modifyUser"

warm garnet
#
LuckPerms api = LuckPermsProvider.get();
api.getUserManager().modifyUser(uuid, (User user) -> {
    // ...
}
```worked in java
nocturne elbow
#

oh god kotlin

warm garnet
#

oh god
@nocturne elbow u what

nocturne elbow
#

😢

crystal sonnet
#

@warm garnet make sure you’re using API version 5.1

warm garnet
#

thanks

digital wasp
#

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?

crystal sonnet
#

Just use the existing meta system in LuckPerms? @digital wasp

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

rustic laurel
#

That would probably be something you should ask Luck on the repo issue tracker

#

!suggest

frank driftBOT
mild pelican
#

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?

frank driftBOT
#

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

nocturne elbow
#

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

thorny echo
#

Please see the name of this chat. This is for the developer API only. Additionally, don't tag staff.

digital wasp
#

Are we able to get the API from a bungee context

#

or just from bukkit/spigot?

neat jackal
#

From all platforms LuckPerms supports

crystal sonnet
#

@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

digital wasp
#

aah I am using MariaDB

#

fwiw it may be a good idea to state the default meta limits

crystal sonnet
#

Well the limits arise from the limit of the column in the database

#

They also vary depending on the storage type as a result

digital wasp
#

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)

crystal sonnet
#

Just increase the length of the column

digital wasp
#

gotcha

#

it wont try to revert the schema right?

crystal sonnet
#

No of course not

#

And if in doubt that you migh lose your data, just make a backup

fathom steppe
#

hello

#

how do i check player's group in LP-Api 5.1?

#

the syntaxes is very different from version 4

obtuse jolt
#

!api prob a good place to start

frank driftBOT
fathom steppe
#

can i use

#

LuckPerms API 4

#

with

#

Luckperms bukkit latest?

#

plugin

unreal mantle
#

Best to always use the latest that is avaliable.

proud crypt
#

use the latest version of LP then install the legacy API extension @fathom steppe

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

frank driftBOT
#

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

fathom steppe
#

@unreal mantle

frank driftBOT
#

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

proud crypt
#

why would you tag me

fathom steppe
#

wrong tag

#

sry

proud crypt
#

did you even read the page i linked

unreal mantle
#

@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.

wild whale
#

And that error is a problem with your plugin.yml...

uncut ice
#

Lost

hybrid plume
#

how to get role of player the biggest priority using LuckPerms api?

nocturne elbow
#

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)

native thistle
#

ok

nocturne elbow
#

So you want to get the prefix of the group the player inherits, right?

native thistle
#

yes

#

where it shows rank

#

i want it to show my rank

crystal sonnet
#

Are you talking about the LP API?

nocturne elbow
#

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.

native thistle
#

wait

#

what

#

rn

crystal sonnet
#

And also why did you remove your original message?

native thistle
#

rn im using essesans x chat

#

for the prefix

crystal sonnet
#

Their first message is an "ok"

nocturne elbow
#

Because I told them to talk in here?

#

. _.

crystal sonnet
#

Ah

#

nvm

native thistle
#

ok so how do i add the prefix

nocturne elbow
#

So, you're using EssXChat to set the prefixes or are they stored with LP? (meta setprefix...)

crystal sonnet
#

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

native thistle
#

hmm

#

how do i do that

crystal sonnet
#

Google is a thing

nocturne elbow
#

VaultAPI

native thistle
#

then what is the point comming here

crystal sonnet
#

We're not here to spoonfeed you answers. We're here to help you help yourself

native thistle
#

no im asking what to do

#

you dont have to give me

#

the code

crystal sonnet
#

And I've told you

#

The easiest way to get the player prefix is by using the VaultAPI

nocturne elbow
#

^

crystal sonnet
#

How you do that can be googled

native thistle
#

ok i got voult api

#

now what

crystal sonnet
#

Get the prefix

native thistle
#

where is the prefix

nocturne elbow
#

Get an instance of Chat and get the prefix from it

crystal sonnet
#

No spoonfeeding fefo

nocturne elbow
#

Too much?

crystal sonnet
#

Waaay too much

native thistle
#

bro

crystal sonnet
#

Getting the prefix is one of the first things they explain in their usage guides

rustic laurel
#

Spoonfeed at your own risk, is probably a better policy Brain kek

crystal sonnet
#

Actually trivial to google

rustic laurel
#

That's got all the answers

native thistle
#

ok

rustic laurel
#

I googled it so you didn't have to

native thistle
#

ty

rustic laurel
#

But now, since I went to levels of effort that you couldn't seem to, I can no longer help

crystal sonnet
#

@rustic laurel that's implementing the API

#

Not using it

#

Close enough

native thistle
#

waiiit

#

do i implent

#

vault api to the server and code

crystal sonnet
#

No that's the wrong thing

native thistle
#

or just cude

#

code*

crystal sonnet
#

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

rustic laurel
#

Almost every single minecraft project has like 3 ways of implementing and then using vault

crystal sonnet
rustic laurel
#

That's... the same link I sent just scrolled up kek

crystal sonnet
#

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

rustic laurel
#

lool

crystal sonnet
#

LuckPerms implements Vault

rustic laurel
#

they seem to be able to be synonymous in non-technical language

crystal sonnet
#

At least partially

rustic laurel
#

implement = use in colloquial english

crystal sonnet
#

they seem to be able to be synonymous in non-technical language
Not that I'm aware of

rustic laurel
#

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

crystal sonnet
#
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

nocturne elbow
#

No spoonfeeding fefo
smh

crystal sonnet
#

Yes because the documentation is actually dogshit

nocturne elbow
#

it is lol

crystal sonnet
#

And it took me 5 minutes figuring it out

nocturne elbow
#

Bit more than a mess

crystal sonnet
#

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

nocturne elbow
#

wait, it's static?

#

damn

crystal sonnet
#

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

nocturne elbow
#

I mean, improper use of static is the way for non-knowledgeable people to easily share data between classes

crystal sonnet
#

Absolutely

native thistle
#

ok first thing

#

how do you intsall vault api

rustic laurel
#

oh dear

#

I'm all pooped out from googling that for you earlier!

crystal sonnet
#

I linked the exact section

native thistle
#

wait

#

so first

#

i need to add vault plugin to my code

crystal sonnet
#

No you need to depend on the VaultAPI in your plugin

native thistle
#

what?

crystal sonnet
#

Essentially the same as depending on the LuckPerms API

native thistle
#

im sorry i know how to make plugins

rustic laurel
#

if you know how, then you should be able to depend on Vault

crystal sonnet
#

I'm starting to doubt that beyond a very very basic level, but ok, what's your point?

native thistle
#

never used voult

nocturne elbow
#

The same way you use the Bukkit API, you'll use Vault API

native thistle
nocturne elbow
#

You don't implement Bukkit into your code

#

You use the api

native thistle
#

this is my code rn

crystal sonnet
#

Yes

#

So?

native thistle
#

im just thinking maby you guys thought i downloaded it

#

the plugin

crystal sonnet
#

No

#

We're struggling to understand what you are struggling with

native thistle
#

look how i added bukkit api is a downloaded spigot 1.14 and added it

crystal sonnet
#

Oh boy

#

So you don't know how to make plugins

nocturne elbow
#

Ever heard of gradle or Maven?

crystal sonnet
#

Good that we established that

native thistle
#

no

#

never

#

herd oh em

rustic laurel
#

Have you heard of Java

native thistle
#

bro

#

you know you could of said

#

just down load vault

rustic laurel
#

you dont just down load vault

#

not when making a plugin that uses it

native thistle
rustic laurel
#

what is that

native thistle
#

where you add you jar files

#

to the code

rustic laurel
#

nooo nononononono nooooo

#

that's a gui that does coding for you

#

that's not coding

native thistle
#

then wht is

rustic laurel
#

maven or gradle, getting deps, using them, etc

native thistle
#

ok

#

so i need to download maven

rustic laurel
#

no facepalm

native thistle
#

and add it right?

#

bruh 😐

rustic laurel
#

maven is probably what your GUI is using right now

native thistle
#

okay

rustic laurel
nocturne elbow
#

No it's not

#

look how i added bukkit api is a downloaded spigot 1.14 and added it

rustic laurel
#

What is it fefo

#

help me understand

#

I've never seen anything like that

nocturne elbow
#

He used BuildTools (I presume) and added the final server jar as a dependency

#

With that "Add JARs" button right there

native thistle
#

bro what do i need to downlowed so i can start using the code

rustic laurel
#

@nocturne elbow is that buildtools? it lets you add things like JARs and variables and class folders?

#

it literally shades them in or something?

native thistle
#

yes

#

that is what it dose

nocturne elbow
#

I-

native thistle
#

why do you think spigot is there

rustic laurel
#

This beyond messed up lol

native thistle
#

ok im adding vault to my built tools

#

and im adding the code

rustic laurel
#

@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

native thistle
#

yes ik

nocturne elbow
rustic laurel
#

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

native thistle
#

@nocturne elbow

frank driftBOT
#

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

native thistle
#

bro

#

it works

#

lmfao

#

the code works

nocturne elbow
#

what works?

native thistle
#

the code

#

i added the vault

rustic laurel
#

which code

native thistle
#

jar into my built tool

rustic laurel
#

no which code works

nocturne elbow
#

wat

#

The piece of code above I didn't paste . _.

native thistle
rustic laurel
#

what are there 12 lines of random whitespace 😩

native thistle
#

bro

nocturne elbow
native thistle
#

okay now you guys are making fun of me

#

will the code work?

rustic laurel
#

you have two onEnables

native thistle
#

yes

rustic laurel
#

you say you can make plugins but I'm concerned

#

well, try the code and see

#

it 99% will not work

native thistle
#

what

#

ok first thing

#

you guys are talking about some thing i never heard

rustic laurel
#

Insanely basic java?

native thistle
#

gave me a code i never saw

#

gave me vault i never used

rustic laurel
#

which does exactly what you need?

#

we gave you a link on how to use it

native thistle
#

bro

#

the link wwas

#

horrable

sudden pelican
#

this hurts my brain

rustic laurel
#

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

native thistle
#

yes

#

i used that code

rustic laurel
#

and then you paste that code in a random spot in your main class

native thistle
#

he never said where to paste it

rustic laurel
#

because you don't

native thistle
#

BRO

#

hmm

rustic laurel
#

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

native thistle
#

oh ok

#

sorry my b

rustic laurel
native thistle
#

i have override commands

rustic laurel
#

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

nocturne elbow
#

2 onEnables lol

#

Oh wait you already said that

native thistle
#

bro

#

i jsut pasted the code

#

it then relised where is sposto go

crystal sonnet
#

@rustic laurel that initial screenshot of the libraries is Eclipse's manual dependency jar management screen

rustic laurel
#

what does it do?

rustic laurel
#

ye

crystal sonnet
#

It let's you manually add jars to a project the code is being built against

#

No maven or anything

rustic laurel
#

does similar things, though, right?

crystal sonnet
#

Kindaish

rustic laurel
#

ah kk

crystal sonnet
#

Like you have to get the jars yourself

native thistle
#

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;
                
                    }
            }
            }```
crystal sonnet
#

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

native thistle
#

is that good brainstone

crystal sonnet
#

No

native thistle
#

what i doing wrong

crystal sonnet
#

Not trying to understand what the code does

rustic laurel
#

he just added your onenable to his

crystal sonnet
#

Inside a for loop inside an if statement

rustic laurel
#

yep

native thistle
#

please

#

please

#

stop using

#

big worlds

crystal sonnet
#

Like I mean I even added where the other code is supposed to go

native thistle
#

words

rustic laurel
#

"for" and "if" are pretty small words that mean pretty big things

native thistle
#

yes sir

rustic laurel
#

your code is inside both

#

er, brain's is

crystal sonnet
#

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

native thistle
#

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

crystal sonnet
#

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

native thistle
#

but

#

i made

#

a fully working server selector

#

from scratch

crystal sonnet
#

Congrats

native thistle
#

i have son idea

crystal sonnet
#

Did you actually make it or did you copy paste it together?

#

And do you understand what the code does I gave you?

native thistle
#

il show you my code

crystal sonnet
#

That does not answer my question

native thistle
#

you

#

know i might just make my own permission plugin

#

how hard can it be

rustic laurel
#

take a look at LP source code

#

even then, you'll have to implement vault

crystal sonnet
#

If you can't get this to work, impossibly hard

native thistle
#

threre are plents of youtube videos and ppl to help me

#

and not yell at me 😄

crystal sonnet
#

Like you won't be able to if you copy and paste things together

rustic laurel
#

not for creating perms plugins lol

crystal sonnet
#

Because writing a permissions plugin requires you to understand what you're doing

#

And you are very clearly not

rustic laurel
#

Take a look at the code - if you can understand it go ahead, but I definitely can't understand it 😂

crystal sonnet
#

I'm not even trying to make fun of you

#

You need to learn java first

native thistle
#

wait

#

all i need

crystal sonnet
#

Making plugins is very advanced

native thistle
#

bro