mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-09-05 20:38:08 +02:00
Added some null checks to DGamePlayer#leave()
This commit is contained in:
parent
329876e881
commit
de1d7e97cb
@ -462,7 +462,13 @@ public class DGamePlayer extends DInstancePlayer {
|
||||
*/
|
||||
public void leave(boolean message) {
|
||||
Game game = Game.getByWorld(getWorld());
|
||||
if (game == null) {
|
||||
return;
|
||||
}
|
||||
DGameWorld gameWorld = game.getWorld();
|
||||
if (gameWorld == null) {
|
||||
return;
|
||||
}
|
||||
GameRules rules = game.getRules();
|
||||
delete();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user