AXHud

Quick rating

AXHud

No reviews yet

A HUD Mod for my plugins

API/Library
Mod Loaders
Fabric
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Where It Runs
Client Only

Runs entirely on the client. Works on vanilla servers.

About

Project Details

Type
Mod
License
All Rights Reserved
Latest Version
1.0.0
Authors

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.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

AXHud

This mod is a HUD mod for some of my plugins.

Features:

  • Currently the mod can display a text next to an item at the top of the users screen

Commands

  • /axhud test diamond: Test the display
  • /axhud clear: Clear the display

Required for:

You can use this mod for your own mods/plugins.

See how [Paper/Spigot 1.21.x]
package <your_package>;

import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;

public class CommunicationInterface {
    private final JavaPlugin plugin;

    /**
     * Constructor - pass your plugin instance
     *
     * Usage in your main plugin class:
     * 
     * public class <your_plugin> extends JavaPlugin {
     *     private CommunicationInterface commInterface;
     *
     *     @Override
     *     public void onEnable() {
     *         this.getServer().getMessenger().registerOutgoingPluginChannel(this, "axhud:display_item");
     *         this.commInterface = new CommunicationInterface(this);
     *     }
     *
     *     public CommunicationInterface getCommInterface() {
     *         return commInterface;
     *     }
     * }
     * 
     */
    public CommunicationInterface(JavaPlugin plugin) {
        this.plugin = plugin;
    }

    /**
     * Send item display data to a player's client
     *
     * @param player The player to send to
     * @param itemId The item ID (e.g., "minecraft:diamond", "minecraft:emerald")
     * @param displayName The name to display next to the item (supports color codes like §a, §b, etc.)
     */
    public void sendItemDisplay(Player player, String itemId, String displayName) {
        ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
        DataOutputStream out = new DataOutputStream(byteStream);

        try {
            // Write item ID string
            writeString(out, itemId);

            // Write display name string
            writeString(out, displayName);

            // Send the plugin message
            player.sendPluginMessage(plugin, "axhud:display_item", byteStream.toByteArray());
        } catch (IOException e) {
            plugin.getLogger().warning("Failed to send item display to player: " + e.getMessage());
        }
    }

    /**
     * Write a string to DataOutputStream in Minecraft's format
     * (VarInt length + UTF-8 bytes)
     */
    private void writeString(DataOutputStream out, String str) throws IOException {
        byte[] bytes = str.getBytes(java.nio.charset.StandardCharsets.UTF_8);
        writeVarInt(out, bytes.length);
        out.write(bytes);
    }

    /**
     * Write a VarInt to DataOutputStream (Minecraft protocol format)
     */
    private void writeVarInt(DataOutputStream out, int value) throws IOException {
        while ((value & 0xFFFFFF80) != 0) {
            out.writeByte((value & 0x7F) | 0x80);
            value >>>= 7;
        }
        out.writeByte(value & 0x7F);
    }
}

Screenshots

Gallery

  • Item display
    Item display

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

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
CurseForge
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works