mirror of
https://github.com/SunNetservers/MiniGames.git
synced 2024-12-05 00:43:15 +01:00
Hopefully prevents an exception when restoring a player's fly state
This commit is contained in:
parent
9c91e11780
commit
de5124c8dd
@ -88,9 +88,9 @@ public abstract class AbstractPlayerEntryState implements PlayerEntryState {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void restore(@NotNull Player player) {
|
public void restore(@NotNull Player player) {
|
||||||
player.setFlying(this.originalIsFlying);
|
|
||||||
player.setGameMode(this.originalGameMode);
|
|
||||||
player.setAllowFlight(this.originalAllowFlight);
|
player.setAllowFlight(this.originalAllowFlight);
|
||||||
|
player.setFlying(player.getAllowFlight() && this.originalIsFlying);
|
||||||
|
player.setGameMode(this.originalGameMode);
|
||||||
player.setInvulnerable(this.originalInvulnerable);
|
player.setInvulnerable(this.originalInvulnerable);
|
||||||
player.setSwimming(this.originalIsSwimming);
|
player.setSwimming(this.originalIsSwimming);
|
||||||
removeMenuItem(player);
|
removeMenuItem(player);
|
||||||
|
Loading…
Reference in New Issue
Block a user