PathConfig
Configuration for assigning a citizen to follow a patrol path.
package com.electro.hycitizens.models;
copyFrom
void copyFrom(@Nonnull PathConfig other)
Copies all fields from another PathConfig into this one.
isFollowPath / setFollowPath
boolean isFollowPath()
void setFollowPath(boolean followPath)
Whether this citizen should follow a patrol path. Default: false.
getPathName / setPathName
@Nonnull String getPathName()
void setPathName(@Nonnull String pathName)
The name of the patrol path to follow. Must match an existing PatrolPath name. Default: "".
isPatrol / setPatrol
boolean isPatrol()
void setPatrol(boolean patrol)
Whether the citizen should actively patrol between waypoints. Default: false.
getLoopMode / setLoopMode
@Nonnull String getLoopMode()
void setLoopMode(@Nonnull String loopMode)
How the path loops:
| Value | Behavior |
|---|---|
"LOOP" | Restart from first waypoint after reaching the last |
"PING_PONG" | Reverse direction after reaching the last waypoint |
getPatrolWanderDistance / setPatrolWanderDistance
float getPatrolWanderDistance()
void setPatrolWanderDistance(float distance)
How far from the path the citizen may wander. Default: 25.0.
getPluginPatrolPath / setPluginPatrolPath
@Nonnull String getPluginPatrolPath()
void setPluginPatrolPath(@Nonnull String path)
Optional override for specifying a patrol path from within a plugin (programmatic use). Default: "".