Patch flight disable, to not effect creative mode.

Full world change config still needs coding.
This commit is contained in:
KHobbits 2012-09-10 01:13:30 +01:00
parent b606f153f4
commit 24cdc37987

View File

@ -12,6 +12,7 @@ import java.util.List;
import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.HumanEntity;
@ -350,7 +351,9 @@ public class EssentialsPlayerListener implements Listener
public void onPlayerChangedWorldHack(final PlayerChangedWorldEvent event)
{
final Player user = event.getPlayer();
user.setAllowFlight(false);
if (user.getGameMode() != GameMode.CREATIVE) {
user.setAllowFlight(false);
}
user.setFlySpeed(0.1f);
user.setWalkSpeed(0.2f);
}