Custom Keys

Right so another topic related to creating custom keys… I have been wandering around the forums looking for examples of how to implement them into a plugin with some success. I have seen a few random examples that did not seem complete but gabizou’s FakeData example seems to be the best out there. In my attempts to make it function just as his example to see how it actually works, I am unable to make the keys themselves (FakeKeys.java) without errors. The fakedata example seems to be from an older version of sponge but I am not completely sure. Any help is appreciated.

(Also let me know if I should be including anything else)

Yes, that example is for an older version of sponge. I utilize custom data quite a bit in my plugin CommandBooks, you’re welcome to take a look at the source as an example of how to utilize custom data/keys to store information to an itemstack :smile:

1 Like

ahhhh thanks so much for that. My only issues were how I was creating the keys and how I was giving them to a player. This is a large amount of frustration gone :smiley:

1 Like