Compatibility
Minecraft: Java Edition
Platforms
Links
Tags
Creators
Details
A Spigot/Paper plugin that gives every Towny town its own private Discord text channel and Discord role. It uses DiscordSRV's linked-account data, so a player's town membership determines their Discord access.

What it does
- Creates a
Town: <town name>role and#town-<town name>channel for each Towny town. - Restricts each channel to its town role;
@everyonecannot see it. - Synchronizes roles for linked Towny residents, including removals after a player leaves or moves towns.
- Bridges TownyChat's
/tctown chat with each town's Discord channel in both directions. - Renames resources after a town rename.
- Detects deleted towns, archives their channel, removes the role, and deletes the archived channel after the configured retention period.
- Reconciles existing towns after startup and periodically thereafter, so it also recovers from missed Towny changes or manual Discord edits.
Requirements
- Spigot/Paper 26.2+ running Java 25+
- Towny Advanced 0.102.0.13+
- TownyChat
- DiscordSRV 1.30.5+, configured and connected to your Discord server
- A Discord bot role with Manage Roles and Manage Channels, positioned above roles created for towns
The plugin targets the Spigot API and works on Spigot/Paper-compatible servers. The latest Towny releases require Paper, Purpur, or Folia rather than plain Spigot, so use one of those server implementations with the latest supported Towny stack.
Installation
Download the plugin, then:
- Copy the plugin JAR to the server's
plugins/folder. - Start the server once, then edit
plugins/TownyChatDiscord/config.yml. - Set
guild-idto your Discord server's numeric ID. To get it, enable Developer Mode in Discord under User Settings → Advanced, then right-click your server and select Copy Server ID. Optionally setcategory-idto a Discord category's numeric ID to place all town channels inside that category; copy it the same way by right-clicking the category and selecting Copy Channel ID. - Restart the server or run
/townychatdiscord reconcileas an operator.
Configuration
guild-id: "123456789012345678"
category-id: "234567890123456789" # optional category ID
role-prefix: "Town: "
channel-prefix: "town-"
sync-interval-seconds: 60
archive-deleted-towns: true
archive-days: 7 # 0 retains archived channels forever
town-chat-bridge:
enabled: true
townychat-channel-name: "town"
discord-to-minecraft-format: "&7[&bDiscord &7| &b%name%&7] &f%message%"
The plugin stores town UUID to Discord role/channel IDs under towns: in a separate towns.yml file. Do not manually change those IDs unless you are deliberately repairing a mapping.
Town chat bridge
TownyChat's town channel is normally named town and used by /tc. The bridge resolves the speaker's actual Towny town, so the "Avalon" town's /tc messages are sent only to #town-avalon and vice versa. Minecraft-to-Discord uses DiscordSRV's webhook delivery utility, retaining the usual DiscordSRV player name/avatar appearance.
Discord authors must be linked through DiscordSRV and currently belong to the town that owns the channel. Discord-originated messages are delivered to online residents and, by default, online players with towny.chat.spy.
Do not add dynamically-created town channel IDs to DiscordSRV's static Channels mapping: this plugin owns their routing.
Operations
/townychatdiscord reconcile immediately performs a full Towny-to-Discord synchronization. It is useful after changing configuration or repairing Discord resources.
Discord role changes are eventually consistent: Discord's API operations are queued, and normal membership changes are reflected on the next reconciliation (60 seconds by default).

