Powerful library for sending custom notifications based on adventure.
Multification makes it simple to create customizable notifications and messages within large plugins that require handling a high volume of messages (while the setup may not be easy, it’s worthwhile for extensive plugins). It offers a range of features, including:
- 💭 Chat messages
- 📕 Title & Subtitle
- 🎬 ActionBar
- 🍫 BossBar
- 🔊 Sounds
- 🎨 Adventure support
- 🌈 MiniMessage support (including gradients, hex colors, hover, click and more)
- 📥 Placeholders
- 🛠️ Formatter support
- 🌎 Flexible messages providing (easy to implement i18n)
- 📦 Configuration support (CDN, Okaeri Configs)
- 🚀 Cross-platform support (Bukkit, Paper)
Messages can be sent to any audience, such as players or the console.
| Platform | Module | Java Version | Adventure API | Status |
|---|---|---|---|---|
| Paper | multification-paper |
Java 21 | Native (built-in) | ✅ Supported |
| Bukkit/Spigot | multification-bukkit |
Java 8+ | External adapter | ✅ Supported |
| Velocity | multification-velocity |
Java 21+ | Native | ✅ Supported |
| Core | multification-core |
Java 8+ | Custom implementation | 🔨 For custom platforms |
💡 Recommendation: Use
multification-paperfor Paper servers (1.19.4+) to leverage native Adventure API without external dependencies.
Add the following repository and dependency to your build.gradle.kts:
repositories {
maven("https://repo.eternalcode.pl/releases")
maven("https://repo.papermc.io/repository/maven-public/")
}
dependencies {
implementation("com.eternalcode:multification-paper:1.2.3")
}repositories {
maven("https://repo.eternalcode.pl/releases")
}
dependencies {
implementation("com.eternalcode:multification-bukkit:1.2.3")
}Note: For custom platforms or other Adventure-based servers, use
multification-coreand implement your own platform adapter.
Then create a new instance of the Multification class and use it to send notifications:
public class YourMultification extends BukkitMultification<MessagesConfig> { private final MessagesConfig messagesConfig; private final AudienceProvider audienceProvider; private final MiniMessage miniMessage; public YourMultification( MessagesConfig messagesConfig, AudienceProvider audienceProvider, MiniMessage miniMessage) { this.messagesConfig = messagesConfig; this.audienceProvider = audienceProvider; this.miniMessage = miniMessage; } @Override protected @NotNull TranslationProvider<MessagesConfig> translationProvider() { return locale -> this.messagesConfig; } @Override protected @NotNull ComponentSerializer<Component, Component, String> serializer() { return this.miniMessage; } @Override protected @NotNull AudienceConverter<CommandSender> audienceConverter() { return commandSender -> { if (commandSender instanceof Player player) { return this.audienceProvider.player(player.getUniqueId()); } return this.audienceProvider.console(); }; } }
Then in init method such as onEnable,
you can create a new instance of the YourMultification class and use it to send notifications:
AudienceProvider audienceProvider = BukkitAudiences.create(this); MiniMessage miniMessage = MiniMessage.miniMessage(); MessagesConfig messagesConfig = new MessagesConfig(); YourMultification multification = new YourMultification(messagesConfig, audienceProvider, miniMessage);
After that, you can use the multification instance to send notifications:
multification.create() .player(player.getUniqueId()) .notice(messages ->messages.yourMessage) .send();
Multification currently supports two configuration libraries:
- CDN Simple and fast property-based configuration library for JVM apps
- Okaeri Configs Simple Java/POJO config library written with love and Lombok
To use the Multification library with one of the configuration libraries, you need to:
implementation("com.eternalcode:multification-cdn:1.1.4") implementation("net.dzikoysk:cdn:1.14.5")
public class MessagesConfig { @Description("# My first message") public Notice firstMessage = Notice.chat("<gradient:red:blue>Multification is awesome!"); }
Cdn cdn = CdnFactory.createYamlLike() .getSettings() .withComposer(Notice.class, new MultificationNoticeCdnComposer(multification.getNoticeRegistry())) .build();
To load and create the config file, use the following code in the init method such as onEnable:
MessagesConfig messages = new MessagesConfig(); Resource resource = Source.of(this.dataFolder, "messages.yml"); cdn.load(resource, messages).orThrow(cause ->cause); cdn.render(config, resource).orThrow(cause ->cause);
Checkout example with CDN! example plugin.
implementation("com.eternalcode:multification-okaeri:1.1.4")Probably also you will need to add additional dependencies for your platform, e.g. :
implementation("eu.okaeri:okaeri-configs-serdes-commons:5.0.5") implementation("eu.okaeri:okaeri-configs-serdes-bukkit:5.0.5") implementation("eu.okaeri:okaeri-configs-yaml-bukkit:5.0.5")
See Okaeri Configs for more information.
public class MessagesConfig extends OkaeriConfig { @Comment("My first message") public Notice firstMessage = Notice.chat("<gradient:red:blue>Multification is awesome!"); }
MessagesConfig config = (MessagesConfig) ConfigManager.create(MessagesConfig.class) .withConfigurer(new MultificationSerdesPack(multification.getNoticeRegistry())) .withConfigurer( new SerdesCommons(), new YamlBukkitConfigurer(), new SerdesBukkit()) // specify configurers for your platform .withBindFile(new File(dataFolder, "messages.yml")) .withRemoveOrphans(true) // automatic removal of undeclared keys .saveDefaults() // save file if does not exists .load(true);
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Made with ❤️ by EternalCodeTeam