mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-23 16:41:43 +01:00
Try harder to pause wander goal during editor
This commit is contained in:
parent
585df3f696
commit
d76841c319
@ -113,18 +113,14 @@ public class WanderWaypointProvider
|
||||
@Override
|
||||
public void begin() {
|
||||
Messaging.sendTr(sender, Messages.WANDER_WAYPOINTS_BEGIN, pathfind ? "<green>" : "<red>");
|
||||
if (currentGoal != null) {
|
||||
currentGoal.pause();
|
||||
}
|
||||
setPaused(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void end() {
|
||||
Messaging.sendTr(sender, Messages.WANDER_WAYPOINTS_END);
|
||||
editingRegions = false;
|
||||
if (currentGoal != null) {
|
||||
currentGoal.unpause();
|
||||
}
|
||||
setPaused(false);
|
||||
markers.destroyMarkers();
|
||||
}
|
||||
|
||||
@ -308,6 +304,9 @@ public class WanderWaypointProvider
|
||||
if (currentGoal == null) {
|
||||
currentGoal = WanderGoal.builder(npc).xrange(xrange).yrange(yrange).fallback(this).tree(this).delay(delay)
|
||||
.worldguardRegion(getWorldGuardRegion()).build();
|
||||
if (paused) {
|
||||
currentGoal.pause();
|
||||
}
|
||||
}
|
||||
Iterator<GoalEntry> itr = npc.getDefaultGoalController().iterator();
|
||||
while (itr.hasNext()) {
|
||||
|
@ -379,7 +379,7 @@ citizens.editors.waypoints.wander.editing-regions-stop=Exited the region editor.
|
||||
citizens.editors.waypoints.wander.worldguard-region-not-found=WorldGuard region not found.
|
||||
citizens.editors.waypoints.wander.worldguard-region-set=WorldGuard region set to [[{0}]].
|
||||
citizens.editors.waypoints.wander.range-set=Wander range set to xrange [[{0}]] and yrange [[{1}]].
|
||||
citizens.editors.waypoints.wander.begin=<aqua>Entered the wander waypoint editor.<br><click:suggest_command:pathfind><hover:show_text:Pathfind>{0}Pathfind</hover></click> | <click:suggest_command:xrange ><hover:show_text:Set the x range in blocks><yellow>x range</hover></click> | <click:suggest_command:yrange ><hover:show_text:Set the y range in blocks><yellow>y range</hover></click> | <click:suggest_command:delay ><hover:show_text:Ticks to wait in between wanders><yellow>delay</hover></click><br><click:suggest_command:regions><yellow>Enter the region editor</click> | <click:suggest_command:worldguardregion ><hover:show_text:Restrict wandering to WorldGuard regions><yellow>region</hover></click>
|
||||
citizens.editors.waypoints.wander.begin=<aqua>Entered the wander waypoint editor.<br><click:suggest_command:pathfind><hover:show_text:Pathfind>{0}Pathfind</hover></click> | <click:suggest_command:xrange ><hover:show_text:Set the x range in blocks><yellow>x range</hover></click> | <click:suggest_command:yrange ><hover:show_text:Set the y range in blocks><yellow>y range</hover></click> | <click:suggest_command:delay ><hover:show_text:Ticks to wait in between wanders><yellow>delay</hover></click><br><click:suggest_command:regions><yellow>Enter the region editor</click> | <click:suggest_command:worldguardregion ><hover:show_text:Restrict wandering to WorldGuard regions><yellow>WorldGuard region</hover></click>
|
||||
citizens.editors.waypoints.wander.end=Exited the wander waypoint editor.
|
||||
citizens.editors.waypoints.wander.delay-set=Delay between wanders set to [[{0}]] ticks.
|
||||
citizens.editors.waypoints.wander.invalid-delay=Invalid delay specified.
|
||||
|
Loading…
Reference in New Issue
Block a user