TownyDiscordChat 3.2.0
A complete Towny Advanced ↔ DiscordSRV bridge for Paper/Purpur
Source code on GitHub · Original inspiration
A complete Towny Advanced ↔ DiscordSRV bridge for Paper/Purpur
Source code on GitHub · Original inspiration
TownyDiscordChat connects Towny Advanced towns and nations to DiscordSRV. It creates and synchronizes Discord roles and channels, provides a town-only two-way chat bridge, publishes rich Towny embeds, and keeps linked accounts aligned with their current town.
Highlights
- Town and nation resources: automatically create roles, text channels and voice channels.
- Town-only chat bridge: Minecraft town chat → the matching Discord channel and Discord → online residents.
- Security checks: linked-account validation, wrong-town protection and Discord administrator overrides.
- Rich bank embeds: deposits, withdrawals, taxes, balances, actors and reasons with configurable fields.
- Town notifications: residents joining/leaving, mayor changes, rank changes, jail, outlaw and tax events.
- Daily NewDay summary: town status, economy and buttons for Taxes, Residents and Outposts.
- Outpost browser: paginated outpost names, PlotGroup names, worlds and coordinates.
- Global fall reports: configurable DiscordSRV embeds for bankrupt, ruined or fallen towns, with ten story variants.
- InteractiveChat support: item previews through InteractiveChat DiscordSRV Addon, with a fallback item embed.
- Dynmap integration: `/town map` creates an overhead town map from Dynmap tiles.
- PlaceholderAPI: external placeholders are available in bridge formats, titles, descriptions, footers and fields.
- All the messages are translatable in your language.
Requirements
- Paper or Purpur 1.21+.
- Paper/Purpur 26.* is supported; Paper 26.* requires Java 25.
- Java 21+ for 1.21.x servers.
- Towny Advanced — required.
- DiscordSRV — required, with a configured Main Guild.
Required plugin dependencies
Optional soft-dependencies
Installation
- Install Towny Advanced and DiscordSRV and configure DiscordSRV's Main Guild.
- Download `TownyDiscordChat-3.2.0.jar` and place it in `/plugins`.
- Give the Discord bot Manage Roles, Manage Channels, Manage Channel Permissions, View Channels, Send Messages, Embed Links and Read Message History.
- Place the bot role above the TownyDiscordChat roles.
- Enable Discord's Message Content Intent for the bot.
- Start the server once and edit `plugins/TownyDiscordChat/config.yml`.
- Use `/tdc sync` from console or an administrator to create and repair resources.
Important configuration
Code (Text):
# TownyDiscordChat/config.yml
bridge:
Enabled: true
MinecraftToDiscord: true
DiscordToMinecraft: true
TownChatOnly: true
RequireLinkedAccount: true
RequireCurrentTown: true
MinecraftFormat: "**[MC] %player%:** %message%"
DiscordFormat: "&8[&2TDC&8] &c%titolo% &8» &7%usernameds% &8» &f%message%"
townychat:
Enabled: true
ChannelPlaceholder: "%townychat_channel_name%"
TownChannelNames: ["town"]
LocalNoNearbyPlayersWarning:
Enabled: true
ChannelNames: ["local"]
Radius: 100
Message: "&cNobody nearby can read your message. Try &f/g&c."
Title: "&cLocal chat has no listeners"
Subtitle: "&7Nobody is close enough to read you"
SoundEnabled: true
Sound: "BLOCK_NOTE_BLOCK_BELL"
SoundVolume: 1.0
SoundPitch: 1.0
messages:
DailySummaryButtons:
Enabled: true
TaxesLabel: "Taxes"
ResidentsLabel: "Residents"
OutpostsLabel: "Outposts"
TownEvents:
rank-add:
Enabled: true
Format: " **Rank:** %resident% received **%rank%** in the town (by %actor%)."
rank-remove:
Enabled: true
Format: " **Rank:** **%rank%** was removed from %resident% (by %actor%)."
taxes:
Enabled: true
Format: " **Taxes:** the town tax was set to **%tax%** (by %actor%)."
GlobalTownFallEmbed:
Enabled: true
- `/tdc sync` — synchronize all Towny roles, channels and linked accounts.
- `/tdc check role` — synchronize your own Towny roles.
- `/tdc check role alllinked` — synchronize all linked accounts.
- `/tdc check role createalltownsandnations` — create or repair all Towny resources.
- `/tdc check textchannel alltownsandnations` — verify town/nation text channels.
- `/tdc check voicechannel alltownsandnations` — verify voice channels.
- `/tdc channels delete <town|all>` — delete town channels while keeping roles.
- `/tdc channels restore <town|all>` — re-enable and recreate intentionally deleted channels.
- `/t discord <newday|chat|jail> <enable|disable>` — configure a town feature.
Discord slash commands
- `/town info` — private summary of your linked town.
- `/town sync` — synchronize your Discord roles.
- `/town map [town]` — show a Dynmap overhead image; other towns require Discord Administrator or a configured admin role.
- `/town notice message:<text>` — send a notice to the town channel as mayor/deputy.
- `/town resync` — synchronize all resources; Discord Administrator only.
Permissions
Code (Text):
TownyDiscordChat.Admin
TownyDiscordChat.Player
TownyDiscordChat.Sync
TownyDiscordChat.Check.Role
TownyDiscordChat.Check.Role.AllLinked
TownyDiscordChat.Check.Role.CreateAllTownsAndNations
TownyDiscordChat.Check.TextChannel.AllTownsAndNations
TownyDiscordChat.Check.VoiceChannel.AllTownsAndNations
Install PlaceholderAPI expansions required by your server and enable `placeholderapi.Enabled`. Native placeholders such as `%town%`, `%mayor%`, `%message%`, `%actor%`, `%resident%`, `%rank%`, `%tax%` and `%balance%` can be combined with external PlaceholderAPI placeholders.
For item previews, install InteractiveChat and InteractiveChat DiscordSRV Addon. Enable `interactivechat.UseDiscordSRVAddon`. Without the addon, TownyDiscordChat can send a fallback item embed for supported hover components.
Compatibility notes
The plugin uses public Bukkit/Paper APIs only and does not use NMS or obfuscated server classes. `api-version: '1.21'` is intentionally kept as the minimum API so the same JAR can load on newer Paper API generations. Paper 26.* changed its versioning scheme and requires Java 25; Towny, DiscordSRV and optional integrations must also support the selected server version.
Support and inspiration
Report bugs and feature requests through the GitHub issue tracker.
The project was inspired by TownyDiscordChat on SpigotMC and has been extended for modern Paper/Purpur, DiscordSRV and Towny versions.
Authors and contributors: thejames10, Hugo5000, ActiveNoise, Smokytek
*** i am not the original author of the resource ***
If this resource helps your server, please leave a rating and feedback on SpigotMC.
TownyDiscordChat is a free Minecraft Java mod. Compatible with Minecraft 1.21, 26.1, 26.2. Downloaded 4 times (via Spigot). Download it and open it directly in the game.