Add teleport listener to AdminWorld monitor.

This commit is contained in:
Steven Lawson 2013-08-12 22:01:28 -04:00
parent eb4622fc28
commit e23db244a5
4 changed files with 12 additions and 6 deletions

View file

@ -1,5 +1,5 @@
#Mon, 12 Aug 2013 21:30:50 -0400
#Mon, 12 Aug 2013 22:00:24 -0400
program.VERSION=2.22
program.BUILDNUM=426
program.BUILDDATE=08/12/2013 09\:30 PM
program.BUILDNUM=428
program.BUILDDATE=08/12/2013 10\:00 PM

View file

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Mon Aug 12 21:30:50 EDT 2013
build.number=427
#Mon Aug 12 22:00:24 EDT 2013
build.number=429

View file

@ -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)
{

View file

@ -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