mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-11 19:00:37 +01:00
Insert in proper position
This commit is contained in:
parent
1d314fba7a
commit
6a3382c5ce
@ -324,10 +324,10 @@ public class LinearWaypointProvider implements EnumerableWaypointProvider {
|
||||
|
||||
Waypoint element = new Waypoint(at);
|
||||
normaliseEditingSlot();
|
||||
if (editingSlot == waypoints.size()) {
|
||||
if (editingSlot + 1 >= waypoints.size()) {
|
||||
waypoints.add(element);
|
||||
} else {
|
||||
waypoints.add(editingSlot, element);
|
||||
waypoints.add(editingSlot + 1, element);
|
||||
}
|
||||
if (showPath) {
|
||||
markers.createMarker(element, element.getLocation().clone().add(0, 1, 0));
|
||||
|
Loading…
Reference in New Issue
Block a user