ModsJava
BukkitChatAPI
Java mod listed for Minecraft 1.8–1.10. Downloads from the MC Java Mods app on Android.
⬇ Download on SpigotBukkitChatAPI
A simple API to compose chats without using Spigot
What is BukkitChatAPI?
BukkitChatAPI is a simple API that makes chat composition easy, and is also independent from SpigotAPI. This API also can send json messages without the painful packet composition.
Beta?
This API is not completely stable; it may need more testing.
EDIT: This plugin is highly unstable; you may decompile it if you will sent any improvements to me. I would really appreciate the help!
Current Broken Features: Chat listeners, Chat.sendChat method.
Spigot-independent?
This plugin does not require Spigot-API, but that does not mean that it will not work on Spigot. This plugin works on Spigot and CraftBukkit.
How about 1.7?
1.7's chat format is not as complicated as 1.8's, and therefor is not supported by this API
Features
• Easy API for sending messages
• Tons of wrappers
• Easy installation
• Fast message composition
• Chat event framework
• Extensive Javadoc
• Javadoc definitions straight from the Minecraft wiki
• Small API
• Protocollib not required
Dependencies
This plugin does not require any additional libraries; however, if you wish to send messages with this API, you will have to use Protocollib .
Support
If you would like support, please create a post telling about your issue in the discussion section.
DO NOT WRITE ABOUT IT IN THE REVIEWS!
Javadoc
The javadoc is available at http://programming-ianmb.rhcloud.com/javadoc/bukkitchatapi/
Installation
To use this API, simply download the jar and include it in your build path.
Don't forget to put a copy of it in your plugins folder!
Snippets
Spoiler: Snippets
Creating and editing a ChatContainer
Sending a chat message
Adding click events
Converting Json and ChatContainers
Modifying outgoing chat messages
Code (Text):
ChatContainer chat = new ChatContainer();
chat.text = "Example Chat Message";
chat.color = "gold";
chat.text = "Example Chat Message";
chat.color = "gold";
Code (Text):
ChatContainer msg = new ChatContainer();
msg.text = "Chat Message";
Chat.sendChat(player, msg);
msg.text = "Chat Message";
Chat.sendChat(player, msg);
Code (Text):
ChatContainer chat = new ChatContainer();
chat.text = "Chat Message";
ChatClickEvent cce = new ChatClickEvent(ChatClickAction.RUN_COMMAND, "/help");
chat.clickEvent = cce;
chat.text = "Chat Message";
ChatClickEvent cce = new ChatClickEvent(ChatClickAction.RUN_COMMAND, "/help");
chat.clickEvent = cce;
Code (Text):
//Convert to json
ChatContainer msg = new ChatContainer();
msg.text = "Chat Message";
String json = msg.toJson();
//Convert from json
msg = Chat.toChatContainer(json);
//You get the same object back!
ChatContainer msg = new ChatContainer();
msg.text = "Chat Message";
String json = msg.toJson();
//Convert from json
msg = Chat.toChatContainer(json);
//You get the same object back!
Code (Text):
//Causes all outgoing messages to have a tooltip that says "Hi"
Chat.addChatListener(new ChatListener() {
public ChatSendEvent onChatSent(ChatSendEvent event) {
ChatContainer c = event.getMessage();
c.hoverEvent = new ChatHoverEvent(ChatHoverAction.SHOW_TEXT, "Hi");
event.setMessage(c);
return event;
}
});
Chat.addChatListener(new ChatListener() {
public ChatSendEvent onChatSent(ChatSendEvent event) {
ChatContainer c = event.getMessage();
c.hoverEvent = new ChatHoverEvent(ChatHoverAction.SHOW_TEXT, "Hi");
event.setMessage(c);
return event;
}
});
Thanks for the support!
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.8, 1.9, 1.10
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
BukkitChatAPI is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.9, 1.10. Downloaded 177 times (via Spigot). Download it and open it directly in the game.