summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/net/ess3/commands/Commandfly.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/Essentials/src/net/ess3/commands/Commandfly.java b/Essentials/src/net/ess3/commands/Commandfly.java
index 24581653d..5166a3c26 100644
--- a/Essentials/src/net/ess3/commands/Commandfly.java
+++ b/Essentials/src/net/ess3/commands/Commandfly.java
@@ -10,10 +10,11 @@ public class Commandfly extends EssentialsToggleCommand
{
protected void setValue(final IUser player, final boolean value)
{
- player.getPlayer().setAllowFlight(value);
- if (!player.getPlayer().getAllowFlight())
+ final Player realPlayer = player.getPlayer();
+ realPlayer.setAllowFlight(value);
+ if (!realPlayer.getAllowFlight())
{
- player.getPlayer().setFlying(false);
+ realPlayer.setFlying(false);
}
}