Muqsit / PlayerVaults

Per-player GUI-based vaults plugin for PocketMine-MP
https://poggit.pmmp.io/p/PlayerVaults
GNU Lesser General Public License v2.1
41 stars 33 forks source link

'Collaboration' with BlockPets #18

Closed Sandertv closed 7 years ago

Sandertv commented 7 years ago

Hey @Muqsit I'm working on a pets plugin as you probably noticed, and decided I wanted to implement per pet inventories. Instead of inventing the wheel twice I thought it would probably be best to utilize PlayerVaults in one way or another. Could you explain to me if there's a way using PlayerVaults to do this, and if so how? If not, do you think you could implement that?

Thanks in advance!

Muqsit commented 7 years ago

Sure, I'll work on this during my free time!

Sandertv commented 7 years ago

Cool. 🎉 🎉 Once you have time to work on it, it'd most likely be best to store them in MySQL with the pet's name and the owner's name. An owner can never have two pets with the same name, so that should make life easier for storing.

Sandertv commented 7 years ago

Added some more events which will make life easier for you to setup database stuff for the pets.

Sandertv commented 7 years ago

@Muqsit I'm thinking of making the inventory more vanilla like actually, but I'm not sure if the inventory like in vanilla with donkeys is possible for pets. If it is possible, I think it'd be best to just implement directly into BlockPets, because it doesn't really make sense for that in PlayerVaults :P

Sandertv commented 7 years ago

Nevermind, minecraft wiki ruined my dreams! ChestedHorse: 1 or 0 (true/false) - true if the horse has chests. A chested horse that is not a donkey or a mule will crash the game.

Feelsbadman.

Muqsit commented 7 years ago

@Sandertv you can copy code from PlayerVaults, it's open source :p I think it'll be better to implement a BlockPets exclusive inventory handler than depend on PlayerVaults.

Sandertv commented 7 years ago

Alright, don't worry, I will give you proper credit for it for sure though, I'll just put it above the file or something.

Sandertv commented 7 years ago

I got a working system, just not really safe SQL access and not async, but I'll do that later when I have time for it. Thanks for all the help, there's a note most of the code from the inventories comes from you. :)