Overview · Getting started · Commands · Configuration · Animations · Quest guidance · Java API
Source scope: Trails 1.6.6, reviewed 24 October 2026. Paper 1.20–26.2 and available Folia 1.20.1–26.2; Core API ≥0.6.18, <0.7.0. Java 21 on compatible older servers, Java 25 for 26.x. These are source targets; match the requirements of the actual downloaded build.
Trails publishes QuestTrailAPI and TrailAnimationAPI through Bukkit’s ServicesManager. Use the matching api classifier artifact as a provided dependency. Do not shade the interfaces or install the API-only JAR on the server. No public Maven repository URL is established by this audit; use the supplied/local-installed artifact for your chosen version.
<dependency>
<groupid>com.riddleslabs</groupid>
<artifactid>riddlestrails</artifactid>
<version>1.6.6</version>
<classifier>api</classifier>
<scope>provided</scope>
</dependency>
The version above matches the audited working tree; it does not imply that artifact is publicly released. Declare a runtime dependency on RiddlesTrails. For a legacy Bukkit descriptor use depend: [RiddlesTrails], or softdepend plus a missing-service path. Native Paper consumers should declare server dependency ordering/classpath sharing in their Paper descriptor. Do not duplicate Core APIs either.
import com.riddleslabs.trails.api.QuestTrailAPI;
QuestTrailAPI trails = getServer().getServicesManager().load(QuestTrailAPI.class);
if (trails == null) return;
trails.showToNpc(playerId, 11);
// Or: trails.showToLocation(playerId, destination);
boolean assigned = trails.hasTrail(playerId);
// Later, when the workflow ends:
trails.clear(playerId);
There is one quest assignment per player. Mutations are queued on that player’s entity scheduler, so hasTrail may not reflect a just-submitted mutation immediately. It reports assignment, not successful routing or visible particles. Ordinary routes remain independent.
NPC IDs must be nonnegative. Location inputs are copied and require finite coordinates and a world. Offline players are not assigned guidance; restore after login/progress loading. Mutations after shutdown reject use of the retired API. The 1.6.6 source supports Paper and Folia, but optional NPC/quest integrations still require compatible builds.
import com.riddleslabs.trails.api.animation.TrailAnimationAPI;
TrailAnimationAPI animations = getServer().getServicesManager()
.load(TrailAnimationAPI.class);
if (animations == null) return;
animations.selectAsync(playerId, "riddlestrails:clockwork-moth")
.whenComplete((ignored, failure) -> {
// Schedule any player/world feedback on its owning scheduler.
// Do not access Bukkit world state directly from this callback.
});
| API | Purpose |
|---|---|
animations() |
Registered built-in and external IDs. |
selected(UUID) |
Effective ID, including fallback if provider unavailable. |
selectAsync / resetAsync |
Save/remove selected-animation preference. |
style(id) |
Read immutable configured style. |
setStyleAsync / resetStyleAsync |
Save/remove an independent player style override. |
register(owner,id,renderer) |
Add an owned custom animation. |
unregister(owner,id) |
Remove an animation registered by that owner. |
Async mutations complete after durable save and publication; failures preserve the previous value. Legacy synchronous select/reset/setStyle/resetStyle methods wait for persistence and can block. Do not use them or join async futures on tick/region threads or Trails’ shared file worker. Preference changes belong at meaningful state changes, not every frame.
animations.register(this, "myplugin:aurora", (frame, particles) -> {
for (double u = 0; u <= 1 && particles.remaining() > 0; u += 0.04) {
double side = Math.sin((u * 3 - frame.phase()) * Math.PI * 2) * 0.5;
particles.emit(frame.point(u, side, 0.4), 0.8, u);
}
});
The frame contains an immutable visible-path snapshot, clock, style, spacing and budget. point follows the path; localPoint/localTransform support rigid shapes. Per-session scratch state is reset on selection/teleport/reload/cleanup; keep it bounded.
The emitter is valid only during the callback and on its thread. Do not retain it or emit asynchronously. Particle output is capped and sent only to the assigned viewer. Render failures are isolated and subsequent frames fall back, but the callback still must finish promptly. Registrations are removed when the owning plugin disables.
TrailAnimationSelectEvent fires before each frame. A listener can choose an ID/style or cancel that frame. This is not a persistent preference update. Source IDs are destination IDs for ordinary trails, npc:<id> for NPC guidance and a location identifier for fixed targets.
On Folia, the event is marked asynchronous but executes on the viewer’s owning entity thread. Access only that ownership context and thread-safe data—not arbitrary players/regions. Paper rendering uses its normal player/main-thread context. Avoid all disk/network work in a frame listener.
Trails supplies guidance and rendering, not quest progression, NPC spawning, payments or Region Manager plot discovery. Your plugin retains authorization and decides when to assign/clear guidance. Do not treat an assignment or rendered trail as proof a player completed a quest.
Public API source · Animation implementation guide
Overview · Getting started · Commands · Configuration · Animations · Quest guidance · Java API
Source repository · Reviewed October 24, 2026.