mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 02:05:41 +00:00
This commit is contained in:
parent
26c83ff585
commit
98f0fdb620
@ -13,6 +13,7 @@ import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.player.PlayerKickEvent;
|
||||
|
||||
public class Cager extends FreedomService
|
||||
{
|
||||
@ -95,6 +96,18 @@ public class Cager extends FreedomService
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onPlayerKick(PlayerKickEvent event)
|
||||
{
|
||||
FPlayer player = plugin.pl.getPlayer(event.getPlayer());
|
||||
CageData cage = player.getCageData();
|
||||
|
||||
if (cage.isCaged())
|
||||
{
|
||||
cage.playerQuit();
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onPlayerJoin(PlayerJoinEvent event)
|
||||
{
|
||||
|
@ -21,6 +21,7 @@ public class Command_gtfo extends FreedomCommand
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
|
||||
if (args.length == 0)
|
||||
{
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user