Pocketmine-mp: Unbanning dead players on hardcore server does not work

Created on 9 May 2018  路  7Comments  路  Source: pmmp/PocketMine-MP

Issue description

As reported by @Muqsit , dead players will get re-banned from the server if they get unbanned and try to join the server again. This occurs because the player's saved health is zero, causing the respawn sequence to be executed again, causing the player to get banned again.

Steps to reproduce the issue

  • die on a hardcore server
  • quit
  • get unbanned
  • try to join again

OS and versions

Gameplay Debugged

Most helpful comment

@MalakasPlayzMC I don't think you know how hardcore servers work. The player data is still very needed. It contains the player's skindata and other things. Deleting it would be too much to lose aside from it being a hacky measure.

All 7 comments

This is rather a tricky bug to fix because of how messed up respawning is right now - #1567 is a key showstopper here.

You can check on PlayerPreLoginEvent if the hardcore is enabled && if the player's health is <= 0. If it is you will do @rmdir("players/".$event->getPlayer()->getName().".dat");

No hacks or tricks

Why thumbs down?

  1. we're not writing plugins here...
  2. that is indeed a hack
  3. it won't work, because player data has not been loaded at that point in the login sequence.

Can't you do this when you load the player data?

@MalakasPlayzMC I don't think you know how hardcore servers work. The player data is still very needed. It contains the player's skindata and other things. Deleting it would be too much to lose aside from it being a hacky measure.

Relates to #1567

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ox531 picture Ox531  路  3Comments

jasonwynn10 picture jasonwynn10  路  3Comments

MisteFr picture MisteFr  路  3Comments

nmo0ory picture nmo0ory  路  3Comments

sergeysova picture sergeysova  路  3Comments