Class ServerCutsceneEvents
java.lang.Object
net.ixdarklord.coolcatcanvas.api.event.v2.common.ServerCutsceneEvents
Cutscenes the server started with
CutsceneControl, as their players watch them. All fire on the server
thread. Cutscenes a client plays on its own are not reported.
ServerCutsceneEvents.KEYFRAME.register((player, cutscene, index) -> {
if (cutscene.equals(MyMod.id("boss_arena")) && index == 2) boss.roar();
});
ServerCutsceneEvents.ENDED.register((player, cutscene, reason) -> arena.begin(player));
KEYFRAME, MARKER and ENDED are what the player's client reports: they arrive a little
after the fact, and a modified client can claim any of them at any time, for the cutscene it was sent. Don't hand
out anything of value on their word alone. STARTED and TICK are the server's own.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfacestatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EventInvoker<ServerCutsceneEvents.Ended> After a player's cutscene ended: seen through, skipped, stopped, replaced by another, or cut short by them leaving.static final EventInvoker<ServerCutsceneEvents.Keyframe> As a player's camera reaches one of the cutscene's keyframes, the first included.static final EventInvoker<ServerCutsceneEvents.Marker> As a player's cutscene passes one of its markers.static final EventInvoker<ServerCutsceneEvents.Started> After a player was sent a cutscene to play.static final EventInvoker<ServerCutsceneEvents.Tick> Every server tick a player is watching a cutscene, from the tick after it was sent until it ends. -
Method Summary
-
Field Details
-
STARTED
After a player was sent a cutscene to play. -
TICK
-
KEYFRAME
As a player's camera reaches one of the cutscene's keyframes, the first included. -
MARKER
As a player's cutscene passes one of its markers. -
ENDED
After a player's cutscene ended: seen through, skipped, stopped, replaced by another, or cut short by them leaving. The place to hand the world back: teleport them, start the fight, lift what kept them safe.
-