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.VERSION=2.22
program.BUILDNUM=426 program.BUILDNUM=428
program.BUILDDATE=08/12/2013 09\:30 PM program.BUILDDATE=08/12/2013 10\:00 PM

View File

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit! #Build Number for ANT. Do not edit!
#Mon Aug 12 21:30:50 EDT 2013 #Mon Aug 12 22:00:24 EDT 2013
build.number=427 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) @EventHandler(priority = EventPriority.NORMAL)
public void onPlayerMove(PlayerMoveEvent event) public void onPlayerMove(PlayerMoveEvent event)
{ {

View File

@ -56,7 +56,7 @@ public class TFM_AdminWorld
if (lastTP == null || lastTP.longValue() + TP_COOLDOWN_TIME <= currentTimeMillis) if (lastTP == null || lastTP.longValue() + TP_COOLDOWN_TIME <= currentTimeMillis)
{ {
teleportCooldown.put(player, 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() new BukkitRunnable()
{ {
@Override @Override