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:
publicclassYourMultificationextendsBukkitMultification<MessagesConfig> {
privatefinalMessagesConfigmessagesConfig;
privatefinalAudienceProvideraudienceProvider;
privatefinalMiniMessageminiMessage;
publicYourMultification(
MessagesConfigmessagesConfig,
AudienceProvideraudienceProvider,
MiniMessageminiMessage) {
this.messagesConfig = messagesConfig;
this.audienceProvider = audienceProvider;
this.miniMessage = miniMessage;
}
@Overrideprotected@NotNullTranslationProvider<MessagesConfig> translationProvider() {
returnlocale -> this.messagesConfig;
}
@Overrideprotected@NotNullComponentSerializer<Component, Component, String> serializer() {
returnthis.miniMessage;
}
@Overrideprotected@NotNullAudienceConverter<CommandSender> audienceConverter() {
returncommandSender -> {
if (commandSenderinstanceofPlayerplayer) {
returnthis.audienceProvider.player(player.getUniqueId());
}
returnthis.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:
AudienceProvideraudienceProvider = BukkitAudiences.create(this);
MiniMessageminiMessage = MiniMessage.miniMessage();
MessagesConfigmessagesConfig = newMessagesConfig();
YourMultificationmultification = newYourMultification(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:
- CDNSimple and fast property-based configuration library for JVM apps
- Okaeri ConfigsSimple 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")publicclassMessagesConfig {
@Description("# My first message")
publicNoticefirstMessage = Notice.chat("<gradient:red:blue>Multification is awesome!");
}Cdncdn = CdnFactory.createYamlLike()
.getSettings()
.withComposer(Notice.class, newMultificationNoticeCdnComposer(multification.getNoticeRegistry()))
.build();To load and create the config file, use the following code in the init method such as onEnable:
MessagesConfigmessages = newMessagesConfig();
Resourceresource = 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.
publicclassMessagesConfigextendsOkaeriConfig {
@Comment("My first message")
publicNoticefirstMessage = Notice.chat("<gradient:red:blue>Multification is awesome!");
}MessagesConfigconfig = (MessagesConfig) ConfigManager.create(MessagesConfig.class)
.withConfigurer(newMultificationSerdesPack(multification.getNoticeRegistry()))
.withConfigurer(
newSerdesCommons(),
newYamlBukkitConfigurer(),
newSerdesBukkit()) // specify configurers for your platform
.withBindFile(newFile(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
