1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-02-25 17:02:48 +01:00

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 b558ff7bf0
commit 7497d94359

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);
}