#PDC confusion

1 messages · Page 1 of 1 (latest)

grizzled shuttle
#

ive gone to this page like 5 times before and still dont understand.

warm dagger
#

What don't you understand

grizzled shuttle
#

just to be sure, is this the part im supposed to be reading?

warm dagger
#

Yup

grizzled shuttle
#

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

warm dagger
#

You literally do it a line up and you're asking me how? You need to learn java

grizzled shuttle
#

im testing it...

#

its not final

warm dagger
#

Yes. It's painfully obvious what is wrong. You don't understand what you're doing.

grizzled shuttle
warm dagger
#

You created a NameSpacedKey a line above then when you need to use it to fetch the stored value you're confused.

grizzled shuttle
warm dagger
#

Are you sure?

#

The documentation you linked me says otherwise

grizzled shuttle
#

bro if your not gonna help and just tell me why i dont know java ima just ask someone else

warm dagger
#

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.

grizzled shuttle
#

so what should i put instead

warm dagger
#

The NameSpacedKey. I've told you 3 times to do it and it's in the documentation you linked

grizzled shuttle
#

oh whatever im just gonna give up on trying to code plugins

#

i clearly dont know what im doing

warm dagger
#

You should be learning java first

grizzled shuttle
#

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

warm dagger
#

replace "key" with your NameSpacedKey from above

#

thats the answer

warm dagger
# grizzled shuttle like this

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

grizzled shuttle
warm dagger
#

You use that for both getting and setting

grizzled shuttle
#

i feel like such an idiot right now. whats wrong about this?

warm dagger
#

Missing the new keyword in front of NameSpacedKey

grizzled shuttle
#

still red

#

wait no

#

i used caps in the wroing place

#

looks like that works

#

thank you!

#

:)

spring otter
#

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