Description
Herochat — The best chat channel mod for Hytale Quick Overview Purpose: Add channels, private messages, nicknames, and simple moderation to your Hytale server. First-time setup
Data files are created under the plugin data directory (the server's plugin data folder) and include:
channels.json — channel definitions and memberships nicknames.json — saved nicknames config.json — plugin configuration flags and defaults
Recommended initial steps after install:
Start server once to let plugin create files. Edit config.json (see HerochatConfig options) for word-filter, cooldowns, and mention settings. Create channels via in-game commands or by editing channels.json and reloading the plugin. Commands (common) Channel management, PMs and ignores are provided by built-in commands. Examples (exact syntax depends on server command registration): /channel create — create a channel /channel join — join a channel /msg — send a private message /reply — reply to last PM /ignore — ignore a player /ignorelist — show ignores
Refer to the server command help in-game for the exact names and aliases.
Configuration notes Token formatting used through the plugin: {nick}, {sender}, {msg}, {prefix}, {suffix}. See Channel.formatMessage and ChatListener.formatMessageForRecipient for details. Channel keys are stored lowercased; use the plugin commands or ChannelManager lookup helpers when integrating.
Permissions
Permission nodes used by the plugin follow this pattern (matching the code):
- Global admin/wildcard:
Herochat.*or server-wide*— full admin control and bypasses - Cooldown bypass (configurable):
Herochat.cooldown.bypass(default inconfig.json)
Channel-specific nodes (replace <channel> with the channel name lowercased):
Herochat.channel.<channel>.join— allow joining the channelHerochat.channel.<channel>.speak— allow sending messages to the channelHerochat.channel.<channel>.see— allow seeing messages from the channel
Notes:
- Channel moderator/owner status is stored in
channels.json(themoderatorslist andownerfield) and is considered authoritative for moderator actions. autoJoinset totruewill automatically add all players to the channel on connect. For private channels, setautoJointofalseand grantHerochat.channel.<name>.jointo the groups/users that should be able to join.- When
autoJoinisfalse, the plugin enforces membership: players can join only if they haveHerochat.channel.<name>.join, are a channel moderator, are the channel owner, or haveHerochat.*/*.
Example nodes:
Herochat.*— admin wildcardHerochat.channel.general.join— grants join to channelgeneralHerochat.channel.general.speak— grants speak ingeneralHerochat.channel.general.see— grants see ingeneral
Troubleshooting & Tips If channels or nicknames don't appear, check the plugin data folder and file permissions. LuckPerms is used only for display metadata (prefix/suffix). The plugin stores authoritative channel permissions inside channels.json and plugin-managed nodes. Developer API (hooking into Herochat)
Herochat exposes internal managers and listeners that other plugins/mods can use. Below are example snippets demonstrating common tasks. Import paths reference the plugin source package net.herotale.herochat.
Important classes you may interact with:
net.herotale.herochat.Herochat — plugin bootstrap and access point net.herotale.herochat.channels.ChannelManager — create/find channels and persist changes net.herotale.herochat.storage.PlayerDataManager — per-player runtime data and nickname storage net.herotale.herochat.listeners.ChatListener — central chat handling and utilities
Notes before integrating:
Respect the plugin's persistence model: channel membership and moderator lists are authoritative in channels.json. Use the provided manager getters rather than instantiating new managers. Example: Obtain the ChannelManager // From another plugin that has access to the server's plugin manager Herochat plugin = (Herochat) server.getPluginManager().getPlugin("Herochat"); ChannelManager cm = plugin.getChannelManager();
// Find channel by name (case-insensitive lookup helper) Channel channel = cm.findChannel("General"); Example: Create a channel programmatically UUID creator = /* the creator's UUID */; Channel channel = cm.createChannel("events", creator); channel.setFormat("[{sender}] {msg}"); cm.saveChannels(); Example: Send a message into a channel // Construct a Message or use helper methods on ChatListener ChatListener chat = plugin.getChatListener(); // Sends a message as 'senderRef' into the channel named 'events' chat.broadcastToChannel(channel, senderRef, "Hello everyone!"); Example: Listen for chat events public class MyListener implements Listener { @EventHandler public void onPlayerChat(PlayerChatEvent e) { // Inspect or modify chat messages, cancel if needed } }
// Registering the listener from your plugin server.getPluginManager().registerEvents(new MyListener(), myPlugin);
Tip: Prefer using the plugin's PlayerRef.sendMessage helpers (used internally) to maintain consistent formatting and color handling.
Example: Access and modify player nicknames
```java PlayerDataManager pdm = plugin.getPlayerDataManager(); pdm.setNickname(playerUuid, "CoolNick"); pdm.saveNicknames();


