Home›Java›Mods›MineChatAPI
MineChatAPI
ModsJava

MineChatAPI

Minecraft Java mod. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot
Overview
Keeps track of all MineChat users that are currently on your server and takes note of the type of phone they are using. This API adds 2 new events you can listen to: EventMineChatClientJoin and EventMineChatClientLeave, a ClientManager class which stores each MineChat client, and a ChatConnection class which stores a player and their phone type.

With the ClientManager, you can add and remove clients and see if a player is using MineChat with a simple # usingMineChat(Player player) method.

Every event passes a player and a ChatConnection object.

For non-developers: Installing this plugin automatically blocks all MineChat connection messages. To disable this, go into the config and set "blockConnectionMsgs" to false.

Here's an example, this will give any player that connects with an iPhone a golden apple.
Code (Text):
@EventHandler
public void onMineChatClientJoin(EventMineChatClientJoin evt) {
    Player player = evt.getPlayer();
    ChatConnection conn = evt.getConnection();
    if(conn.getPhoneType() == PhoneType.IPHONE) {
        player.getInventory().addItem(new ItemStack(Material.GOLDEN_APPLE));
    }
}
JavaDocs will be added soon. I hope you enjoy this API.
Source code: Github
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

MineChatAPI is a free Minecraft Java mod. Downloaded 425 times (via Spigot). Download it and open it directly in the game.

Explore more