Disable player flight
This commit is contained in:
parent
b84e96f031
commit
8a86f15996
@ -4,7 +4,7 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import wtf.beatrice.limbomanager.listeners.CommandCanceller;
|
||||
import wtf.beatrice.limbomanager.listeners.PlayerHider;
|
||||
import wtf.beatrice.limbomanager.listeners.PlayerChecker;
|
||||
import wtf.beatrice.limbomanager.listeners.PlayerTeleporter;
|
||||
import wtf.beatrice.limbomanager.listeners.RiskyBlocksHandler;
|
||||
import wtf.beatrice.limbomanager.objects.LocationCheckRunnable;
|
||||
@ -23,7 +23,7 @@ public class LimboManager extends JavaPlugin {
|
||||
instance = this;
|
||||
pluginManager = Bukkit.getServer().getPluginManager();
|
||||
|
||||
pluginManager.registerEvents(new PlayerHider(), this);
|
||||
pluginManager.registerEvents(new PlayerChecker(), this);
|
||||
pluginManager.registerEvents(new PlayerTeleporter(), this);
|
||||
pluginManager.registerEvents(new CommandCanceller(), this);
|
||||
pluginManager.registerEvents(new RiskyBlocksHandler(), this);
|
||||
|
@ -8,8 +8,9 @@ import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import wtf.beatrice.limbomanager.LimboManager;
|
||||
|
||||
public class PlayerHider implements Listener
|
||||
public class PlayerChecker implements Listener
|
||||
{
|
||||
// this class performs various checks on player join and quit to ensure general safety.
|
||||
|
||||
|
||||
@EventHandler
|
||||
@ -28,6 +29,10 @@ public class PlayerHider implements Listener
|
||||
otherPlayer.hidePlayer(plugin, joiner);
|
||||
joiner.hidePlayer(plugin, otherPlayer);
|
||||
}
|
||||
|
||||
// disable flight
|
||||
joiner.setAllowFlight(false);
|
||||
joiner.setFlying(false);
|
||||
}
|
||||
|
||||
@EventHandler
|
Loading…
Reference in New Issue
Block a user