Reset handler caches when a move type is non-cancellable.

This commit is contained in:
sk89q 2015-01-27 15:21:56 -08:00
parent e1843624bb
commit afcf93b7b1

View File

@ -223,6 +223,12 @@ public Location testMoveTo(Player player, Location to, MoveType moveType, boolea
lastRegionSet = toSet.getRegions();
}
// Some handlers (see: exit flag) store 'last position data' that
// becomes invalid if we're going to let the player move anyway
if (moveType.isCancellable()) {
resetState(player);
}
return null;
}