Skip to content

flexible framework designed for managing and dispatching animations for server-side applications.

Notifications You must be signed in to change notification settings

noyzys/nautchkafe-animation-dispatcher

Repository files navigation

-> Keyframe animation dispatcher <-

Overview of the API Facade Usage:

Configuration Before Sending and Executing Animations to use the animation API you must first configure the keyframes before sending and executing them.

KeyframeAnimationMessageConfig config = new KeyframeAnimationMessageConfig(
    titleMessage = "Your Title Message",
    subtitleMessage = "Your Subtitle Message",
    character = "", // Optionally, specify a character for animation
    numberOfFrames = 5 // Specify the number of frames to operate on
);

Example

Ij 1 Ij 2 Ij 3

Player player = event.getPlayer();
KeyframeAnimationMessageConfig config = new KeyframeAnimationMessageConfig(
        "Title Message", 
        "Subtitle Message", 
        "", 
        5
);
	
// Create and dispatch standard the animation
KeyframeAnimationDispatcher instantDispatcher = KeyframeAnimationDispatcher.of(player, config,
        KeyframeRenderer.miniMessageRenderer(),
        Duration.ofSeconds(10), this
);

        instantDispatcher.dispatch();
// Create custom keyframes animation
List<Keyframe> customKeyFrames = List.of(
        new Keyframe("S", "s"),
        new Keyframe("U", "u"),
        new Keyframe("S", "s")
);

KeyframeAnimationMessageConfig customKeyframesConfig = new KeyframeAnimationMessageConfig(
        "Start Title",
        "Start subtitle",
        "",
        10,
        customKeyFrames
);

KeyframeAnimationDispatcher customDispatcher = KeyframeAnimationDispatcher.of(player, customKeyframesConfig,
        KeyframeRenderer.miniMessageRenderer(),
        Duration.ofSeconds(20), this
);

        customDispatcher.dispatch();

Additional Implementations

In addition to the primary implementation, several example animations have also been provided, such as:

If you are interested in exploring functional programming and its applications within this project visit the repository at vavr-in-action, fp-practice.

About

flexible framework designed for managing and dispatching animations for server-side applications.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published