mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
fixed fly
This commit is contained in:
parent
e3e18b259d
commit
5de8f6bf9b
@ -175,11 +175,13 @@ public class PlotListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void plotExit(Player player, Plot plot) {
|
public static void plotExit(Player player, Plot plot) {
|
||||||
player.setAllowFlight(false);
|
|
||||||
{
|
{
|
||||||
PlayerLeavePlotEvent callEvent = new PlayerLeavePlotEvent(player, plot);
|
PlayerLeavePlotEvent callEvent = new PlayerLeavePlotEvent(player, plot);
|
||||||
Bukkit.getPluginManager().callEvent(callEvent);
|
Bukkit.getPluginManager().callEvent(callEvent);
|
||||||
}
|
}
|
||||||
|
if(plot.settings.getFlag("fly") != null) {
|
||||||
|
player.setAllowFlight(Bukkit.getAllowFlight());
|
||||||
|
}
|
||||||
if(plot.settings.getFlag("gamemode") != null) {
|
if(plot.settings.getFlag("gamemode") != null) {
|
||||||
player.setGameMode(Bukkit.getDefaultGameMode());
|
player.setGameMode(Bukkit.getDefaultGameMode());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user