Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noyzys/nautchkafe-animation-dispatcher
flexible framework designed for managing and dispatching animations for server-side applications.
https://github.com/noyzys/nautchkafe-animation-dispatcher
bukkit bukkit-api bukkit-plugin bukkit-plugins dispatcher fp functional-programming spigot spigot-api vavr
Last synced: about 1 month ago
JSON representation
flexible framework designed for managing and dispatching animations for server-side applications.
- Host: GitHub
- URL: https://github.com/noyzys/nautchkafe-animation-dispatcher
- Owner: noyzys
- Created: 2024-11-02T22:35:18.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-12-20T14:46:40.000Z (about 1 month ago)
- Last Synced: 2024-12-20T15:45:39.090Z (about 1 month ago)
- Topics: bukkit, bukkit-api, bukkit-plugin, bukkit-plugins, dispatcher, fp, functional-programming, spigot, spigot-api, vavr
- Language: Java
- Homepage:
- Size: 588 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# -> 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.```java
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
```java
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();
``````java
// Create custom keyframes animation
List 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:- [Countdown Animation](https://github.com/noyzys/nautchkafe-animation-dispatcher/blob/main/src/main/java/dev/nautchkafe/animation/impl/CountdownAnimation.java)
- [Custom Character Animation](https://github.com/noyzys/nautchkafe-animation-dispatcher/blob/main/src/main/java/dev/nautchkafe/animation/impl/CustomCharacterAnimation.java)
- [Loading Progress Animation](https://github.com/noyzys/nautchkafe-animation-dispatcher/blob/main/src/main/java/dev/nautchkafe/animation/impl/LoadingProgressAnimation.java)
- [Spinning Slash Animation](https://github.com/noyzys/nautchkafe-animation-dispatcher/blob/main/src/main/java/dev/nautchkafe/animation/impl/SpinningSlashAnimation.java)
- [Wobble Text Animation](https://github.com/noyzys/nautchkafe-animation-dispatcher/blob/main/src/main/java/dev/nautchkafe/animation/impl/WobbleTextAnimation.java)**If you are interested in exploring functional programming and its applications within this project visit the repository at [vavr-in-action](https://github.com/noyzys/bukkit-vavr-in-action), [fp-practice](https://github.com/noyzys/fp-practice).**