Mod
message-api
No reviews yet
Fabric message api for translatable, configurable and colorful messages with placeholders
Provides a framework or library for other mods to use.
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
message-api
A simple server-side message API for Fabric. It allows for translatable messages, with text parsing using PlaceholderAPI , which can be customized with ease by end users.
Features
- Special text parsing with PlaceholderAPI
- Easy customizable in-game messages
- Language localization support
- Easy to integrate
Usage
Adding the dependency
To use message-api in your mod, add the following to your build.gradle file:
Message-api doesn't bundle placeholder-api, you have to bundle a compatible of it as well.
Replace [TAG] with the respective versions.
repositories {
maven { url "https://maven.nucleoid.xyz/" }
maven { url "https://api.modrinth.com/maven" }
}
dependencies {
include(modImplementation("maven.modrinth:message-api:[TAG]"))
include(modImplementation("eu.pb4:placeholder-api:[TAG]"))
}
Adding messages
Create a messages folder in your resource folder. Create a JSON file with
the language code you would like to add, like
the testmod example.
Add your message to the file (make sure to prefix the message id with your mod id, to avoid conflicts).
Creating messages
Use any of the provided methods in LocalizedMessage to get your text instance, which works like any other vanilla text instance!
ServerPlayerEntity player;
player.sendMessageToClient(LocalizedMessage.localized("modid.some.message.id"));
Official Mojang Mappings
ServerPlayer player;
player.sendSystemMessage(LocalizedMessage.localized("modid.some.message.id"));
User configuration
To change messages, edit the JSON file in ./config/<modid>/<languageid>.json. This will change the language file for
the mod with the specified modid.
Credits
Special thanks to PlaceholderAPI for providing the parsing functionality.
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers