mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-26 01:51:40 +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);
|
Waypoint element = new Waypoint(at);
|
||||||
normaliseEditingSlot();
|
normaliseEditingSlot();
|
||||||
if (editingSlot == waypoints.size()) {
|
if (editingSlot + 1 >= waypoints.size()) {
|
||||||
waypoints.add(element);
|
waypoints.add(element);
|
||||||
} else {
|
} else {
|
||||||
waypoints.add(editingSlot, element);
|
waypoints.add(editingSlot + 1, element);
|
||||||
}
|
}
|
||||||
if (showPath) {
|
if (showPath) {
|
||||||
markers.createMarker(element, element.getLocation().clone().add(0, 1, 0));
|
markers.createMarker(element, element.getLocation().clone().add(0, 1, 0));
|
||||||
|
Loading…
Reference in New Issue
Block a user