Перейти к содержимому
Mineforgian

GChat Towny addon

Townyadvanced support addon for GChat

Загрузки
166
Подписчики
1
Обновлён
9 сентября 2025 г.
Лицензия
MIT

Опубликован 8 сентября 2025 г.

gChat-Towny

gChat-Towny is an addon for the gChat plugin that integrates support for Towny. It allows you to display player town and nation tags directly in chat using placeholders or formatted tags.

⚠️ IMPORTANT: Starting from GChat v2.3.0, Towny support is built-in natively. If you are using gChat version 2.3.0 or higher, you do NOT need to install this addon. Please remove this jar to avoid conflicts.

Features

  • Displays town and nation tags in chat (for legacy gChat versions).

  • Supports HEX colors for tags (e.g., &#FF0000 → red).

  • Integration with PlaceholderAPI:

    • %gchat_towny% — full tag: [Nation | Town]
    • %gchat_townytown% — town tag: [Town]
    • %gchat_townynation% — nation tag: [Nation]
  • Fully compatible with older versions of gChat: tags are automatically applied in chat format.

  • Checks for Towny and gChat — disables itself safely if dependencies are missing.

  • Debug mode for checking tags and configuration.

  • Configurable via towny-gChat.yml. Installation

  • Download gChat-Towny.jar.

  • Place the file in your server's plugins folder.

  • Make sure you have installed:

    • gChat (Version older than 2.3.0)
    • Towny
    • (optional) PlaceholderAPI
  • Start the server. The plugin will create a configuration file at plugins/gChat/towny-gChat.yml. Configuration Example towny-gChat.yml: tag_formats: town: '&f[&a%s&f] ' nation: '&f[&#FF5656%s&f] ' both: '&f[&c%s&f | &a%s&f] ' use_hex_colors: true debug: false

  • tag_formats.town — format for town tag.

  • tag_formats.nation — format for nation tag.

  • tag_formats.both — format for both town and nation.

  • use_hex_colors — enables HEX colors in tags.

  • debug — enables console error output for debugging. PlaceholderAPI Placeholders

    Placeholder Description
    %gchat_towny% Full tag: [Nation / Town]
    %gchat_townytown% Town tag [Town]
    %gchat_townynation% Nation tag [Nation]
    Compatibility
  • gChat < 2.3.0 (Only for versions older than 2.3.0)

  • Towny 0.101+

  • Minecraft 1.21+

  • PlaceholderAPI (optional)

Ченджлог

1.1Релиз1.21.6, 1.21.7, 1.21.8 · 9 сентября 2025 г.

✨ Changelog — gChatTowny v1.1

New Features and Improvements:

  • 🏙 Added support for Towny town and nation tags (getTag()):

    • If a town/nation has a tag, it will be used instead of the full name.
    • If no tag exists, the full name is used as before.
  • ⚙️ New configuration option in towny-gChat.yml:

    prefer_tag: true
    
    • true → tag takes priority.
    • false → always use full names.
  • 🎨 Updated message formatting system:

    • Supports HEX colors like &#FF5656.
    • Fully compatible with standard Minecraft color codes &a, &b, &c....
  • 🔌 Full PlaceholderAPI support:

    • %gchat_towny% → Nation + Town (or just Town if no nation).
    • %gchat_townytown% → Town (tag or full name).
    • %gchat_townynation% → Nation (tag or full name).

Technical Changes:

  • Added resolveTownName() and resolveNationName() methods to respect the prefer_tag setting.
  • Refactored getTownyTag(), getTownTag(), and getNationTag() for clarity.
  • Config now auto-generates with new settings on first run.

Комментарии

Загружаем…