Fix /dxl leave NPE

This commit is contained in:
Daniel Saukel 2016-05-11 14:15:37 +02:00
parent 02e738e840
commit a4f04ab92b

View File

@ -362,9 +362,9 @@ public class DGamePlayer extends DInstancePlayer {
/* Actions */ /* Actions */
@Override @Override
public void leave() { public void leave() {
GameRules rules = Game.getByWorld(getWorld()).getRules();
delete(); delete();
GameRules rules = Game.getByWorld(getWorld()).getRules();
if (finished) { if (finished) {
getSavePlayer().reset(rules.getKeepInventoryOnFinish()); getSavePlayer().reset(rules.getKeepInventoryOnFinish());
} else { } else {