mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-11 13:33:54 +00:00
Add teleport listener to AdminWorld monitor.
This commit is contained in:
@ -213,6 +213,12 @@ public class TFM_PlayerListener implements Listener
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void onPlayerTeleport(PlayerTeleportEvent event)
|
||||
{
|
||||
TFM_AdminWorld.getInstance().validateMovement(event);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
public void onPlayerMove(PlayerMoveEvent event)
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ public class TFM_AdminWorld
|
||||
if (lastTP == null || lastTP.longValue() + TP_COOLDOWN_TIME <= currentTimeMillis)
|
||||
{
|
||||
teleportCooldown.put(player, currentTimeMillis);
|
||||
TFM_Util.bcastMsg(player.getName() + " attempted to access the AdminWorld.", ChatColor.RED);
|
||||
TFM_Log.info(player.getName() + " attempted to access the AdminWorld.");
|
||||
new BukkitRunnable()
|
||||
{
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user