Open Tolo0 opened 8 years ago
Erm fixed
Where can I get the fixed version?
goto https://github.com/Minifixio/pocketmine-1vs1-plugin Klick "DOWNLOAD-ZIP" goto http://pmt.mcpe.me/ upload the zip file AND WAM you have the .phar plugin
If it works then please close this :)
ClearSky Crash Dump Fri Jan 29 09:09:56 EST 2016
Error: Call to undefined method Minifixio\onevsone\ArenaManager::getServer() File: /phar_pocketmine-1vs1-plugin-master_XjXy8TKeL4DD4XQ.phar/src/Minifixio/onevsone/ArenaManager Line: 68 Type: E_ERROR
THIS CRASH WAS CAUSED BY A PLUGIN BAD PLUGIN: 1vs1 v0.0.4
Code:
[59] }
[60]
[61] // Load arenas and signs
[62] $this->parseArenaPositions($arenaPositions);
[63] $this->parseSignPositions($signPositions);
[64]
[65] // Launch sign refreshing task
[66] $task = new SignRefreshTask(OneVsOne::getInstance());
[67] $task->arenaManager = $this;
[68] $this->signRefreshTaskHandler = $this->getServer()->getScheduler()->scheduleRepeatingTask($task, self::SIGN_REFRESH_DELAY * 20); //Using a Static Function(Server::getInstance is bad practise! Fixed this.
[69] }
[70]
[71] /*
[72] * Create arenas
[73] /
[74] public function parseArenaPositions(array $arenaPositions) {
[75] foreach ($arenaPositions as $n => $arenaPosition) {
[76] Server::getInstance()->loadLevel($arenaPosition[3]);
[77] if(($level = $this->getServer()->getLevelByName($arenaPosition[3])) === null){ //Again, bad practise by using a static function(Server::getInstance), Fixed this.
[78] $this->getServer()->getLogger()->error("[1vs1] - " . $arenaPosition[3] . " is not loaded. Arena " . $n . " is disabled."); //Again, bad practise by using a static function(Server::getInstance), Fixed this.
Backtrace:
Oh
Still crash 😩
Please post crshdump
ClearSky Crash Dump Fri Jan 29 19:34:15 EST 2016
Error: Call to undefined method Minifixio\onevsone\ArenaManager::getOwner() File: /pocketmine-1vs1-plugin-patch-1/src/Minifixio/onevsone/ArenaManager Line: 68 Type: E_ERROR
THIS CRASH WAS CAUSED BY A PLUGIN BAD PLUGIN: 1vs1 v0.0.4
Code:
[59] }
[60]
[61] // Load arenas and signs
[62] $this->parseArenaPositions($arenaPositions);
[63] $this->parseSignPositions($signPositions);
[64]
[65] // Launch sign refreshing task
[66] $task = new SignRefreshTask(OneVsOne::getInstance());
[67] $task->arenaManager = $this;
[68] $this->signRefreshTaskHandler = $this->getOwner()->getServer()->getScheduler()->scheduleRepeatingTask($task, self::SIGN_REFRESH_DELAY * 20); //Using a Static Function(Server::getInstance is bad practise! Fixed this.
[69] }
[70]
[71] /*
[72] * Create arenas
[73] /
[74] public function parseArenaPositions(array $arenaPositions) {
[75] foreach ($arenaPositions as $n => $arenaPosition) {
[76] Server::getInstance()->loadLevel($arenaPosition[3]);
[77] if(($level = $this->getServer()->getLevelByName($arenaPosition[3])) === null){ //Again, bad practise by using a static function(Server::getInstance), Fixed this.
[78] $this->getServer()->getLogger()->error("[1vs1] - " . $arenaPosition[3] . " is not loaded. Arena " . $n . " is disabled."); //Again, bad practise by using a static function(Server::getInstance), Fixed this.
Backtrace:
Try it again, should be fixed now: https://github.com/robske110/pocketmine-1vs1-plugin/tree/patch-1
No crash dumb but I get this on console. .. 2016-01-30 [03:59:56] [NOTICE]: UndefinedPropertyException: "Undefined property: Minifixio\onevsone\ArenaManager::$main" (E_NOTICE) in "/phar_pocketmine-1vs1-plugin-patch-1-1_qoBcgNifMloPpMJ.phar/src/Minifixio/onevsone/ArenaManager" at line 68 2016-01-30 [03:59:56] [INFO]: Disabling 1vs1 v0.0.4
Ok, i will restore some bad practise..,
That works good. Thanks 😊
Will make an PR on this repository, then this can be closed...
I will PR the following things soon: getServer() fix Join Sign Random Area select
Ok. I'm really busy for now. I hope have time to work on soon and try to look more about these bad practices and other bugs.
When players killed. They don't drop items at all. And I mean when killed not in a 1vs1 arena .