TownyChatDiscord
SpigotMCModrinthSpigot/Paper plugin that gives every Towny town its own private Discord text channel and syncs town
6 téléchargements
dernière v1.0.0 SpigotMC
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; @everyone cannot see it.
- Synchronizes roles for linked Towny residents, including removals after a player leaves or moves towns.
- Bridges TownyChat's /tc town 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-id to 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 set category-id to 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 reconcile as an operator.
Configuration
Code (YAML):
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%"
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%"
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).
Versions
FAQ
Comment installer TownyChatDiscord ?
Téléchargez le fichier pour votre version de Minecraft et votre loader sur cette page, puis placez le .jar dans le dossier mods (ou plugins) et lancez le jeu.
TownyChatDiscord est-il gratuit ?
TownyChatDiscord est gratuit sur Modgrid — nous renvoyons directement vers la source officielle, sans paywall.
Quelles versions de Minecraft TownyChatDiscord prend-il en charge ?
Prend en charge les versions 26.2–26.2. La liste des versions et loaders pris en charge est dans la section de téléchargement de cette page.
Commentaires 0
Aucun commentaire pour l'instant. Sois le premier à donner ton avis.