#PDC confusion
1 messages · Page 1 of 1 (latest)
What don't you understand
just to be sure, is this the part im supposed to be reading?
Yup
k so what do i put for "NamespacedKey key"
if i set the key to "key" on a PDC i used before and put the same there why does it come up as an error
like this
@warm dagger
You literally do it a line up and you're asking me how? You need to learn java
Yes. It's painfully obvious what is wrong. You don't understand what you're doing.
very true i have no clue what im doing
You created a NameSpacedKey a line above then when you need to use it to fetch the stored value you're confused.
im just trying to figure out how PDC are used. i dont actually need it a line after.
bro if your not gonna help and just tell me why i dont know java ima just ask someone else
Because I've already told you twice
It's in the documentation you linked
The fact you don't understand is not my fault
You created a NameSpacedKey in the first line yet you use a string in the second where the key should be.
so what should i put instead
The NameSpacedKey. I've told you 3 times to do it and it's in the documentation you linked
oh whatever im just gonna give up on trying to code plugins
i clearly dont know what im doing
You should be learning java first
i just wanted to make a a couple simple plugins for personal use and dont want to invest hours into learning the specifics of java. im just not gonna do plugins
In this image. You have a name spaced key on the first line. That's your key you're going to use to both set and get the value
so what would i put exactly? just NamespaceKey or what?
In this image you instantiate a new NameSpacedKey((Plugin) this,"key") that is your key
You use that for both getting and setting
i feel like such an idiot right now. whats wrong about this?
Missing the new keyword in front of NameSpacedKey
still red
wait no
i used caps in the wroing place
looks like that works
thank you!
:)
you don't need to learn everything in java
but you should know how to read errors, stacktraces, know how to make good methods, dont static abuse,...
because after all of that the only thing you can learn is just the api, which i think is pretty easy to learn