Normalise editing slot.

This commit is contained in:
fullwall 2012-05-30 16:39:35 +08:00
parent 4144953dff
commit d826bb3b69
1 changed files with 1 additions and 0 deletions

View File

@ -59,6 +59,7 @@ public class LinearWaypointProvider implements WaypointProvider, Iterable<Waypoi
Messaging.send(player, String.format("<e>Added<a> a waypoint at (" + formatLoc(at)
+ ") (<e>%d<a>, <e>%d<a>)", editingSlot + 1, waypoints.size()));
} else if (waypoints.size() > 0) {
editingSlot = Math.min(0, Math.max(waypoints.size() - 1, editingSlot));
waypoints.remove(editingSlot);
editingSlot = Math.max(0, editingSlot - 1);
Messaging.send(player, String.format("<e>Removed<a> a waypoint (<e>%d<a> remaining) (<e>%d<a>)",