Skip to content

thejames10/TownyDiscordChat

Repository files navigation

GitHub release (latest by date including pre-releases) GitHub issues GitHub code size in bytes GitHub license

Installation

  1. Install/Configure Towny and DiscordSRV.
  2. Download our latest release.
  3. Delete existing config.yml if you are using a previous version.
  4. Start server to generate config.yml then stop the server.
  5. Configure the plugin with recommended settings.
  6. Configure permission nodes to use in-game commands.
  7. Start the server and join the game.
  8. Run the first 4 commands if this is your first time.
  9. Enjoy!

Configuration File

DO NOT COPY THIS FILE. FOR REFERENCE ONLY. SEE COMMENTS.

nation:
  # Make sure this is 'true' during pre-release
  CreateTextChannelForRole: true
  # Make sure this is 'true' during pre-release
  CreateVoiceChannelForRole: true
  # Make sure this is 'true' during pre-release
  UseCategoryForText: true
  # Make sure this is 'true' during pre-release
  UseCategoryForVoice: true
  # Make sure to set this to a category during pre-release - https://www.youtube.com/watch?v=NLWtSHWKbAI
  TextCategoryId: 0 # This can be the same as the nation.VoiceCategoryID but make sure they are NOT the same as the town categoryIds
  # Make sure to set this to a category during pre-release - https://www.youtube.com/watch?v=NLWtSHWKbAI
  VoiceCategoryId: 0 # This can be the same as the nation.TextCategoryID but make sure they are NOT the same as the town categoryIds
  # Make sure this is 'true' during pre-release
  CreateRoleIfNoneExists: true
  # Make sure this is a valid color during pre-release
  RoleCreateColorCode: '0xc9c012'
town:
  # Make sure this is 'true' during pre-release
  CreateTextChannelForRole: true
  # Make sure this is 'true' during pre-release
  CreateVoiceChannelForRole: true
  # Make sure this is 'true' during pre-release
  UseCategoryForText: true
  # Make sure this is 'true' during pre-release
  UseCategoryForVoice: true
  # Make sure to set this to a category during pre-release - https://www.youtube.com/watch?v=NLWtSHWKbAI
  TextCategoryId: 0 # This can be the same as the town.VoiceCategoryID but make sure they are NOT the same as the nation categoryIds
  # Make sure to set this to a category during pre-release - https://www.youtube.com/watch?v=NLWtSHWKbAI
  VoiceCategoryId: 0 # This can be the same as the town.TextCategoryID but make sure they are NOT the same as the nation categoryIds
  # Make sure this is 'true' during pre-release
  CreateRoleIfNoneExists: true
  # Make sure this is a valid color during pre-release
  RoleCreateColorCode: '0x006798'
messages:
  # See https://github.com/thejames10/TownyDiscordChat/blob/main/AvailableTimeZones.txt
  TimeZone: UTC
  # See https://github.com/thejames10/TownyDiscordChat/blob/main/AvailableDateFormats.txt
  DateFormat: dd/MM/yyyy - hh:mm a
  # Make sure to set this to a channel during pre-release - https://www.youtube.com/watch?v=NLWtSHWKbAI
  DiscordLogTextChannelId: 0 # I would set this to a channelId that is NOT within the TOWN or NATION categories.
  # Prefix used when sending messages via discord or minecraft
  Prefix: '&8[&2TDC Bot&8]'
  
  Commands:
    PleaseWait: '&7Please wait...'
    NoPermission: '&7You don''t have permission to use this command!'
  Role:
    DoNothing:
      Success: '&7Role change not required!'
      Failure: '&7Failed to do nothing!'
    Remove:
      Success: '&7Removed role!'
      Failure: '&7Failed to remove role!'
    Add:
      Success: '&7Added role!'
      Failure: '&7Failed to add role!'
    Create:
      Success: '&7Created role!'
      Failure: '&7Failed to create role!'
    Delete:
      Success: '&7Deleted role!'
      Failure: '&7Failed to delete role!'
    Rename:
      Success: '&7Renamed role!'
      Failure: '&7Failed to rename role!'
  TextChannel:
    DoNothing:
      Success: '&7TextChannel change not required!'
      Failure: '&7Failed to do nothing!'
    Remove:
      Success: '&7Removed TextChannel!'
      Failure: '&7Failed to remove TextChannel!'
    Add:
      Success: '&7Added TextChannel!'
      Failure: '&7Failed to add TextChannel!'
    Create:
      Success: '&7Created TextChannel!'
      Failure: '&7Failed to create TextChannel!'
    Delete:
      Success: '&7Deleted TextChannel!'
      Failure: '&7Failed to delete TextChannel!'
    Rename:
      Success: '&7Renamed TextChannel!'
      Failure: '&7Failed to rename TextChannel!'
  VoiceChannel:
    DoNothing:
      Success: '&7VoiceChannel change not required!'
      Failure: '&7Failed to do nothing!'
    Remove:
      Success: '&7Removed VoiceChannel!'
      Failure: '&7Failed to remove VoiceChannel!'
    Add:
      Success: '&7Added VoiceChannel!'
      Failure: '&7Failed to add VoiceChannel!'
    Create:
      Success: '&7Created VoiceChannel!'
      Failure: '&7Failed to create VoiceChannel!'
    Delete:
      Success: '&7Deleted VoiceChannel!'
      Failure: '&7Failed to delete VoiceChannel!'
    Rename:
      Success: '&7Renamed VoiceChannel!'
      Failure: '&7Failed to rename VoiceChannel!

When adding this plugin to an existing Towny server make sure to run the first 4 commands in the order shown below.
Check they have completed before running the next one.

Commands

/TDC Check Role CreateAllTownsAndNations

Permission Node: TownyDiscordChat.Check.Role.CreateAllTownsAndNations:

Description: Allows you to force run a check for discord roles of all players in a town or nation and creates them if needed

/TDC Check TextChannel AllTownsAndNations

Permission Node: TownyDiscordChat.Check.TextChannel.AllTownsAndNations:

Description: Allows you to force run a check for discord text channels of all players in a town or nation and creates them if needed

/TDC Check VoiceChannel AllTownsAndNations

Permission Node: TownyDiscordChat.Check.VoiceChannel.AllTownsAndNations:

Description: Allows you to force run a check for discord voice channels of all players in a town or nation and creates them if needed

/TDC Check Role AllLinked

Permission Node: TownyDiscordChat.Check.Role.AllLinked:

Description: Allows you to force run a check for discord roles of all players in a town or nation then adds or removes them if needed

/TDC Check Role

Permission Node: TownyDiscordChat.Check.Role:

Description: Allows you to force run a check for discord roles of a single player in a town or nation then adds or removes

Nodes Structure

TownyDiscordChat.Admin

- TownyDiscordChat.Check.Role.CreateAllTownsAndNations
- TownyDiscordChat.Check.TextChannel.AllTownsAndNations
- TownyDiscordChat.Check.VoiceChannel.AllTownsAndNations
- TownyDiscordChat.Check.Role.AllLinked
- TownyDiscordChat.Check.Role

TownyDiscordChat.Player

- TownyDiscordChat.Check.Role

About

Link Between Towny and Discord

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages