mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-30 13:09:10 +01:00
Add more waypoint manipulation flags
This commit is contained in:
parent
34c61dcc07
commit
c9f51bca26
@ -55,8 +55,7 @@ public class LinearWaypointProvider implements WaypointProvider {
|
|||||||
if (args.hasFlag('h')) {
|
if (args.hasFlag('h')) {
|
||||||
waypoints.add(new Waypoint(player.getLocation()));
|
waypoints.add(new Waypoint(player.getLocation()));
|
||||||
return null;
|
return null;
|
||||||
}
|
} else if (args.hasValueFlag("at")) {
|
||||||
if (args.hasValueFlag("at")) {
|
|
||||||
try {
|
try {
|
||||||
Location location = Util.parseLocation(player.getLocation(), args.getFlag("at"));
|
Location location = Util.parseLocation(player.getLocation(), args.getFlag("at"));
|
||||||
waypoints.add(new Waypoint(location));
|
waypoints.add(new Waypoint(location));
|
||||||
@ -64,8 +63,15 @@ public class LinearWaypointProvider implements WaypointProvider {
|
|||||||
Messaging.sendError(player, e.getMessage());
|
Messaging.sendError(player, e.getMessage());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
} else if (args.hasFlag('c')) {
|
||||||
if (args.hasFlag('p')) {
|
waypoints.clear();
|
||||||
|
return null;
|
||||||
|
} else if (args.hasFlag('l')) {
|
||||||
|
if (waypoints.size() > 0) {
|
||||||
|
waypoints.remove(waypoints.size() - 1);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
} else if (args.hasFlag('p')) {
|
||||||
setPaused(!isPaused());
|
setPaused(!isPaused());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user