ecoron / PurePerms

Manage your permissions like you did on Bukkit.
https://github.com/PurePlugins/PurePerms
GNU General Public License v3.0
1 stars 1 forks source link

SimpleAuth Issue #3

Closed BlindTail closed 9 years ago

BlindTail commented 9 years ago

Sorry for not making this issue in ecoron/SimpleAuth. For some reason the issue button is not available there.

Anyway your 1.8.0 fork of SimpleAuth crashes when one player above max players joins (they get kicked with "server full"). Note that Shoghi made some code changes to the UUID; so we may need a new approach for fixing SimpleAuth and PurePerms:

https://github.com/PocketMine/PocketMine-MP/commit/ed559fdf98456b9bb6ff77c1bf09da397f91ecf8

The error that occurs when you have 2/2 players in server and attempt to connect a third player is:

Error: Call to a member function toString() on null
File: /SimpleAuth_v1.8.0.phar/src/SimpleAuth/task/ShowMessageTask
Line: 47
Type: E_ERROR

THIS CRASH WAS CAUSED BY A PLUGIN
BAD PLUGIN: SimpleAuth v1.8.0

Code:
[38]            return $this->owner;
[39]    }
[40] 
[41]    public function addPlayer(Player $player){
[42]        $uuid = $player->getUniqueId()->toString();
[43]            $this->playerList[$uuid] = $player;
[44]    }
[45] 
[46]    public function removePlayer(Player $player){
[47]        $uuid = $player->getUniqueId()->toString();
[48]            unset($this->playerList[$uuid]);
[49]    }
[50] 
[51]    public function onRun($currentTick){
[52]            $plugin = $this->getPlugin();
[53]            if($plugin->isDisabled()){
[54]                    return;
[55]            }
[56] 
[57]            foreach($this->playerList as $player){

Backtrace:
#0 (): pocketmine\Server->crashDump(boolean)

PocketMine-MP version: 1.6dev #29 [Protocol 34; API 1.13.0]

I wonder if the uuid data is null because the player has already been kicked for "server full" before SimpleAuth gets a chance to run.

ecoron commented 9 years ago

my fault, didn't enabled the issue feature :) i move this issue to the SimpleAuth repo and take a look on it.

ecoron commented 9 years ago

new version of SimpleAuth should solve the issue