As you can see its 1vs1 but im trying to make it 2vs2 and I don't know if im going somewhere with this.I don't know nothing about php...Went from python.
I didn't read your code, because I don't know line, file or where you're getting that error. When you get that messages usually means that are you're using $this->getServer() instead $event (Or your event variable name).
@TheClimbing If you have used the github version of 1vs1, it has an bug there (https://github.com/Minifixio/pocketmine-1vs1-plugin/issues/29) You have to replace all $this->getServer() with Server::getInstance (BAD PRACTISE) This commit caused it: https://github.com/Minifixio/pocketmine-1vs1-plugin/commit/2b98cf87a58c82cba2a97728b412ae9737ecdee4
Using Server::getInstance() is bad practice. The proper way to fix it is to properly reference your main class rather than using statics everywhere.
I was thinking this was a copy of minifixio's plugin if you dont know php you shouldnt be trying to make plugins knowing php alone is quiet the challenge but then you gotta learn OOP and thats also a challenge and then knowing the docs ontop of that is a lot and it takes time you should study up before you attempt to make plugins or modify others #learnfromexp
So what should i do? Should i pass $server = $this->getServer() to the ArenaManager class? And why is Server::getInstance() an bad practise?
Somebody told me once it just caused errors sometimes in plugins its easier to remember the other one anyways
I was thinking about the same question.Really why it is a bad practice?As i said im new,right now im learning php so what you mean by passing the $server = $this->getServer() to the ArenaManager class
I have removed ALL the bad practice. Your plug in should work properly now. Also I have edited the set kit section in the Arena.php file and made it a bit interesting. If any issues pm or post here!! Also sorry for the double plugins.
Also if you use this webpage http://pmt.mcpe.me it practically tells you what errors are in the plugins file when you convert the compressed files into a .phar