RA-Cutscene

A camera cutscene engine for Paper 1.21.x with an in-game keyframe editor, spline camera paths, timed events (titles, sounds, commands), skip by double sneak, crash recovery, and Bedrock fallbacks.

Author: Raja Evian Aditya Website: rajaaditya.my.id Version: 1.0.0 API: Paper 1.21.x or Leaf (Java 21). Folia is not supported


Features

Make Cutscenes In Game

  • Record a cutscene by standing in the world and running /cutscene addframe. The camera follows your eye position and view direction at each keyframe
  • Preview without saving, adjust frames, then save to a YAML file in cutscenes/
  • Files can also be edited by hand and reloaded with /cutscene reload

Smooth Camera

  • The player is put in spectator mode and attached to an invisible ItemDisplay that moves along the path
  • Three interpolation styles: linear (constant speed), smooth (ease in and out for each segment), and spline (a smooth curve through every frame, the default)
  • Client-side smoothing makes movement look fluid
  • A cutscene with no frames is allowed too, and then it is just a sequence of events with no camera

Timeline Events

Events run at a chosen tick, or at end:

TypeValueExample
titleTitle | Subtitle (MiniMessage)title <gold>Chapter 1 | The Beginning
actionbarMiniMessage textactionbar <gray>Sneak twice to skip
messageMiniMessage textmessage <yellow>Hello %player%
soundkey [volume] [pitch]sound entity.ender_dragon.growl 1 0.8
commandconsole command without /command give %player% diamond 1
timetick number or resettime 18000 (client time only)

Placeholders: %player%, and %uuid% for command events.

Safe for Players

  • Players can skip by sneaking twice within 2 seconds, unless the cutscene is not skippable
  • Commands are blocked during a cutscene, except the ones you allow (staff with cutscene.bypass can use any)
  • The player's location, gamemode, flight, and invulnerability are restored afterwards. They are also saved to snapshots.yml, so a crash or disconnect mid-cutscene is recovered on the next join
  • once cutscenes are shown to each player a single time

Bedrock Support

Set bedrock.mode:

  • FALLBACK (default): no camera movement, only timeline events (title, sound, message, command)
  • FULL: the same camera as Java. It can stutter through Geyser, so test first
  • SKIP: show nothing and run only the end events

For Other Plugins

  • Run it from the console, command blocks, DeluxeMenus, or other plugins, for example cutscene play intro <player>
  • A developer API and two Bukkit events: CutsceneStartEvent (can be cancelled) and CutsceneEndEvent (reason: FINISHED, SKIPPED, STOPPED, DISCONNECT)

Dependencies

PluginRequiredPurpose
FloodgateNo (softdepend)Bedrock detection. Without it, a name prefix is used

Installation

  1. Place RA-Cutscene.jar into your plugins/ folder
  2. Restart the server
  3. Edit config.yml and messages.yml if you want to change anything

File Structure

text
1
plugins/RA-Cutscene/
├── config.yml        # Camera, skip, titles, Bedrock, allowed commands
├── messages.yml      # All messages (MiniMessage)
├── cutscenes/        # One file per cutscene
├── data.yml          # Players who have seen "once" cutscenes
└── snapshots.yml     # Temporary player state while watching

Making Your First Cutscene

text
1
/cutscene create intro
  1. Stand where the camera should start, look the way you want, and run /cutscene addframe 0. For the first frame, the ticks are how long the camera stays still before moving
  2. Move to the next point, set your view, and run /cutscene addframe 80. For the later frames, the ticks are the travel time from the previous frame (20 ticks = 1 second)
  3. Repeat for more points. All frames must be in the same world
  4. Add events, for example:
text
1
/cutscene addevent 10 title <gradient:aqua:white>Welcome</gradient> | Enjoy the game
/cutscene addevent 10 sound entity.player.levelup 1 1
/cutscene addevent end command spawn %player%
  1. Test with /cutscene preview. Use /cutscene tpframe, /cutscene delframe, and add again to fix a frame
  2. Run /cutscene save, then play it with /cutscene play intro

end events run after the player's state has been restored, so they are safe for teleports and rewards. They run when a cutscene finishes or is skipped, but not on /cutscene stop. If a player skips, middle events that have not run yet are not run, so put important things in end.


Configuration

config.yml

yaml
1
camera:
  smoothing-ticks: 2          # 1-3 is smooth, higher feels floaty

skip:
  confirm-window-ticks: 40    # sneak twice within this time to skip

title:
  fade-in: 10
  stay: 50
  fade-out: 15

allowed-commands:             # usable during a cutscene, without the slash
  - cutscene
  - cs

bedrock:
  mode: FALLBACK              # FULL, FALLBACK, or SKIP
  name-prefix: "."            # used when Floodgate is missing

cutscenes/intro.yml

yaml
1
world: world
settings:
  skippable: true
  interpolation: SPLINE
  end-hold: 20
  once: false
frames:
  - {x: 100.5, y: 80.0, z: 200.5, yaw: 90.0, pitch: 15.0, ticks: 0}
  - {x: 120.0, y: 85.0, z: 210.0, yaw: 120.0, pitch: 25.0, ticks: 80}
events:
  - {tick: 10, type: TITLE, value: "<aqua>Welcome | Enjoy the game"}
  - {tick: end, type: COMMAND, value: "spawn %player%"}

Per-cutscene options (/cutscene set <option> <value>)

OptionValuesDefaultDescription
skippabletrue / falsetrueWhether players may skip
interpolationlinear / smooth / splinesplineThe shape of the camera path
end-holdticks20How long the camera stays after the last frame
oncetrue / falsefalseEach player sees it once. Use -f to force

The total length is the sum of all frame ticks plus end-hold, or the last event tick if that is larger.


Commands

The main command is /cutscene (alias /cs).

Playing

CommandDescription
/cutscene play <id>Play on yourself
/cutscene play <id> <player>Play on a player
/cutscene play <id> @aPlay on everyone online
/cutscene play <id> [player] -fForce it even if once was already seen
/cutscene stop [player|all]Stop a cutscene without running end events

From the console, a player name is required.

Creating and editing (players only, cutscene.admin)

CommandDescription
/cutscene create <id>Start a new draft
/cutscene edit <id>Load an existing cutscene as a draft
/cutscene addframe <ticks>Add a keyframe at your eye position and view
/cutscene delframe [number]Delete a keyframe (the last one by default)
/cutscene tpframe <number>Teleport to a keyframe to adjust it
/cutscene framesList keyframes
/cutscene addevent <tick|end> <type> <value>Add a timeline event
/cutscene delevent <number> / /cutscene eventsRemove or list events
/cutscene set <option> <value>Change a cutscene option
/cutscene previewWatch the draft without saving
/cutscene save / /cutscene discardSave or throw away the draft

Other

/cutscene list, /cutscene info [id], /cutscene delete <id> confirm, /cutscene reload, /cutscene help.


Permissions

PermissionDefaultDescription
cutscene.playopPlay cutscenes on yourself
cutscene.play.othersopPlay on other players and @a
cutscene.adminopCreate, edit, stop, delete, and reload (includes the two above)
cutscene.bypassfalseUse any command while watching a cutscene

For Developers

java
1
CutsceneManager cutscenes = CutscenePlugin.get().manager();
Cutscene intro = cutscenes.get("intro");
if (intro != null) {
    PlayResult result = cutscenes.play(player, intro, false, false);
}

Add softdepend: [RA-Cutscene] to your own plugin. To run it from another plugin without the API, use Bukkit.dispatchCommand(console, "cutscene play intro " + player.getName()).


Troubleshooting

  • Choppy camera: raise camera.smoothing-ticks from 2 to 3, or use interpolation smooth or spline
  • A player is stuck in spectator: run /cutscene stop <player>. If a player leaves during a cutscene, their state is restored on the next join
  • "World is not loaded": the world named in the cutscene file is not loaded
  • Another plugin blocks the spectator teleport: allow the player during the cutscene using CutsceneStartEvent and CutsceneEndEvent

Limitations

  • Paper and Leaf only, no Folia support
  • Fade-to-black and letterbox effects need a resource pack and are not included
  • A player can watch only one cutscene at a time

License

Developed by Raja Evian Aditya — rajaaditya.my.id