Compare commits
No commits in common. "8bc992a70764d7501c55482c2e21f38fb4a762de" and "b84e96f0319c5fa8a9a8f3b432635747fb212879" have entirely different histories.
8bc992a707
...
b84e96f031
@ -4,7 +4,7 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import wtf.beatrice.limbomanager.listeners.CommandCanceller;
|
import wtf.beatrice.limbomanager.listeners.CommandCanceller;
|
||||||
import wtf.beatrice.limbomanager.listeners.PlayerChecker;
|
import wtf.beatrice.limbomanager.listeners.PlayerHider;
|
||||||
import wtf.beatrice.limbomanager.listeners.PlayerTeleporter;
|
import wtf.beatrice.limbomanager.listeners.PlayerTeleporter;
|
||||||
import wtf.beatrice.limbomanager.listeners.RiskyBlocksHandler;
|
import wtf.beatrice.limbomanager.listeners.RiskyBlocksHandler;
|
||||||
import wtf.beatrice.limbomanager.objects.LocationCheckRunnable;
|
import wtf.beatrice.limbomanager.objects.LocationCheckRunnable;
|
||||||
@ -23,7 +23,7 @@ public class LimboManager extends JavaPlugin {
|
|||||||
instance = this;
|
instance = this;
|
||||||
pluginManager = Bukkit.getServer().getPluginManager();
|
pluginManager = Bukkit.getServer().getPluginManager();
|
||||||
|
|
||||||
pluginManager.registerEvents(new PlayerChecker(), this);
|
pluginManager.registerEvents(new PlayerHider(), this);
|
||||||
pluginManager.registerEvents(new PlayerTeleporter(), this);
|
pluginManager.registerEvents(new PlayerTeleporter(), this);
|
||||||
pluginManager.registerEvents(new CommandCanceller(), this);
|
pluginManager.registerEvents(new CommandCanceller(), this);
|
||||||
pluginManager.registerEvents(new RiskyBlocksHandler(), this);
|
pluginManager.registerEvents(new RiskyBlocksHandler(), this);
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package wtf.beatrice.limbomanager.listeners;
|
package wtf.beatrice.limbomanager.listeners;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.GameMode;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
@ -9,9 +8,8 @@ import org.bukkit.event.player.PlayerJoinEvent;
|
|||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
import wtf.beatrice.limbomanager.LimboManager;
|
import wtf.beatrice.limbomanager.LimboManager;
|
||||||
|
|
||||||
public class PlayerChecker implements Listener
|
public class PlayerHider implements Listener
|
||||||
{
|
{
|
||||||
// this class performs various checks on player join and quit to ensure general safety.
|
|
||||||
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
@ -30,13 +28,6 @@ public class PlayerChecker implements Listener
|
|||||||
otherPlayer.hidePlayer(plugin, joiner);
|
otherPlayer.hidePlayer(plugin, joiner);
|
||||||
joiner.hidePlayer(plugin, otherPlayer);
|
joiner.hidePlayer(plugin, otherPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// disable flight
|
|
||||||
joiner.setAllowFlight(false);
|
|
||||||
joiner.setFlying(false);
|
|
||||||
|
|
||||||
// set gamemode
|
|
||||||
joiner.setGameMode(GameMode.CREATIVE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
Loading…
Reference in New Issue
Block a user