RA-Cutscene
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
ItemDisplaythat moves along the path - Three interpolation styles:
linear(constant speed),smooth(ease in and out for each segment), andspline(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:
| Type | Value | Example |
|---|---|---|
title | Title | Subtitle (MiniMessage) | title <gold>Chapter 1 | The Beginning |
actionbar | MiniMessage text | actionbar <gray>Sneak twice to skip |
message | MiniMessage text | message <yellow>Hello %player% |
sound | key [volume] [pitch] | sound entity.ender_dragon.growl 1 0.8 |
command | console command without / | command give %player% diamond 1 |
time | tick number or reset | time 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.bypasscan 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 oncecutscenes 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 firstSKIP: show nothing and run only theendevents
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) andCutsceneEndEvent(reason:FINISHED,SKIPPED,STOPPED,DISCONNECT)
Dependencies
| Plugin | Required | Purpose |
|---|---|---|
| Floodgate | No (softdepend) | Bedrock detection. Without it, a name prefix is used |
Installation
- Place
RA-Cutscene.jarinto yourplugins/folder - Restart the server
- Edit
config.ymlandmessages.ymlif you want to change anything
File Structure
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
/cutscene create intro
- 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 - 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) - Repeat for more points. All frames must be in the same world
- Add events, for example:
/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%
- Test with
/cutscene preview. Use/cutscene tpframe,/cutscene delframe, and add again to fix a frame - 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
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
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>)
| Option | Values | Default | Description |
|---|---|---|---|
skippable | true / false | true | Whether players may skip |
interpolation | linear / smooth / spline | spline | The shape of the camera path |
end-hold | ticks | 20 | How long the camera stays after the last frame |
once | true / false | false | Each 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
| Command | Description |
|---|---|
/cutscene play <id> | Play on yourself |
/cutscene play <id> <player> | Play on a player |
/cutscene play <id> @a | Play on everyone online |
/cutscene play <id> [player] -f | Force 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)
| Command | Description |
|---|---|
/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 frames | List keyframes |
/cutscene addevent <tick|end> <type> <value> | Add a timeline event |
/cutscene delevent <number> / /cutscene events | Remove or list events |
/cutscene set <option> <value> | Change a cutscene option |
/cutscene preview | Watch the draft without saving |
/cutscene save / /cutscene discard | Save or throw away the draft |
Other
/cutscene list, /cutscene info [id], /cutscene delete <id> confirm, /cutscene reload, /cutscene help.
Permissions
| Permission | Default | Description |
|---|---|---|
cutscene.play | op | Play cutscenes on yourself |
cutscene.play.others | op | Play on other players and @a |
cutscene.admin | op | Create, edit, stop, delete, and reload (includes the two above) |
cutscene.bypass | false | Use any command while watching a cutscene |
For Developers
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-ticksfrom 2 to 3, or useinterpolation smoothorspline - 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
CutsceneStartEventandCutsceneEndEvent
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