Sueta

TreexClans

3.2
·Plugin
  1. 3.2latestStability3 weeks ago

    TreexClans 3.2

    A major stability and security update. Before updating, make a backup of storage.yml, data.db, or your MySQL database.

    ⚠️ Important Update Notes

    - PlaceholderAPI is now required. The plugin will not start without it. - MySQL: Tables now use the treexclans_ prefix. Old tables will be automatically renamed on the first launch. - SQLite: Along with data.db, the data.db-wal and data.db-shm files will appear — this is normal, do not delete them. - On the first launch, the plugin will automatically remove players who were incorrectly listed in two clans at the same time due to old bugs (more details in the console). New settings and messages will be automatically added to your config.yml and messages.yml, and your existing changes will not be affected.

    New Settings (config.yml)

    storage:
      autosave-minutes: 5          # clan autosave interval
      table-prefix: "treexclans_"  # MySQL table prefix
    
    base-teleport-delay: 3         # delay for /clan base in seconds, 0 = instant

    Security & Dupes

    - Fixed a money dupe caused by /clan deposit and /clan withdraw with invalid amounts. - /clan withdraw now checks for the withdraw permission (previously, the deposit permission was enough). - Fixed an item dupe from the clan chest after a restart. - Permission changes made in the rank menu of one clan no longer apply to other clans. - The leader rank can no longer be changed through the permissions menu. - Clan chat no longer processes formatting tags or clickable elements from player messages. - Muted players can no longer send messages in clan chat, including via /clan chat <text>. - The member limit can no longer be bypassed by sending multiple invitations. - Invitations from a disbanded clan no longer work for a new clan with the same name. - /clan transfer can no longer freeze the server. - /clan kick and /clan invite no longer target players whose usernames only start with the specified text.

    Data Saving

    - Added autosaving. Clan money and member lists are saved immediately after changes, and the clan chest is saved immediately after it's closed. - Kicked or left players no longer rejoin their clan after a restart. - Disbanded clans no longer reappear after a restart on SQLite or MySQL. - Renaming a clan no longer creates a duplicate clan or causes addon data to be lost. - storage.yml is no longer corrupted if the server crashes during saving. - A single corrupted clan no longer prevents the plugin from starting — it will be skipped and logged in the console. - A clan base located in a world that hasn't been loaded yet is no longer erased.

    Gameplay Changes

    - /clan base now has a teleport delay, which is canceled if the player moves or takes damage. - The clan creation fee is only charged if the clan is actually created. - Renaming a clan no longer charges the clan creation fee. - /clan kick, /clan setrank, and /clan transfer now work for members who are currently offline. - /clan accept now checks if there is free space in the clan. - The slogan now uses its own length and character restrictions from the slogan section (previously, it used the prefix settings). - At maximum level, clan XP now continues to accumulate instead of resetting to zero. - Fixed the "last seen" time for players who haven't been online for more than 24 days.

    Admin Commands

    - /tc reload no longer breaks addon commands and now only closes plugin menus. - /tc reset_storage now requires confirmation (/tc reset_storage confirm) and will actually delete clans. - /tc clan <clan> disband now works from the console. - /tc clan <clan> rename now checks if the name is valid and notifies you if it's already taken. - /tc commands no longer throw errors when arguments are missing or invalid numbers are provided.

    Miscellaneous

    - Fixed console errors for /clan setrank when used on a player not in a clan, and for the member menu when a player has no known nickname. - Addons are now loaded in the correct dependency order. Rank permissions from addons no longer reset after a restart. - Config updates from older versions are now applied in a single launch. - Improved clan lookup performance for placeholders, chat, and damage. **bold text**
    21 downloads
  2. 3.1 BetaSep 4, 2026

    For Developers

    - I developed a smart technology for the new Storage system called BaseSection. It allows your addons to store any custom data directly in the plugin's own storage, so you no longer have to implement your own storage system. Why is it "smart"? Because even if a server owner switches the storage backend from YAML to SQLite or anything else in the future, your code won't need any changes. You won't have to adapt your addon for each storage implementation—the data will automatically be routed to the correct backend. This system is the main reason why this update took longer than expected. And yes, BaseSection is fully asynchronous, powered by CompletableFuture. - You can now create custom permissions for ranks. Example:
    Permission permission = PermissionRegistry.register("glow");
    if (member.getRank().hasPermission(permission)) {
      // yes
    } else {
      // no
    }
    The registered permission can then be assigned to a rank by its ID directly in the config or GUI.

    For Users

    - Added a clan storage filter:
    clan-storage:
      filter:
        type: BLACKLIST # or WHITELIST
        materials:
          - BEDROCK
          - BARRIER
    - Along with BaseSection, SQLite and MySQL support has been added. These storage implementations are currently experimental and may receive improvements in future updates. YAML remains the stable backend, just as before. - The /treexclans reload command has been improved. However, storage is no longer restarted during reload, since doing so could slow down the reload process. - The RanksGui model has been slightly changed: - Instead of type: all_ranks, use rank: all, or instead of type: leader_rank, use rank: leader. - You can now also define any custom rank and give it a unique style in the menu, for example rank: manager. - Fixed placeholders: - %clan_tag% - %clan_prefix% - New placeholder: - %clan_addon_status_<id>% — Returns true if an addon with the specified ID is loaded; otherwise returns false. - Added the /clan rename command to change a clan's tag. - Added the /clan transfer command to transfer clan ownership to another player. New admin commands:
    ▪ /tc clan <clan> disband - Disband a clan
    ▪ /tc clan <clan> rename - Change the clan tag
    ▪ /tc clan <clan> setprefix - Change the clan prefix
    ▪ /tc clan <clan> setslogan - Change the clan slogan
    ▪ /tc clan <clan> balance - View the clan bank balance
    ▪ /tc clan <clan> withdraw - Withdraw money from the clan bank
    ▪ /tc clan <clan> deposit - Deposit money into the clan bank
    ▪ /tc clan <clan> base - Teleport to the clan base
    ▪ /tc clan <clan> resetbase - Remove the clan base
    ▪ /tc clan <clan> transfer - Transfer clan ownership
    ▪ /tc clan <clan> chest - Open the clan storage
    
    ▪ /tc reset_storage - Clear the storage database
    - While testing the plugin, I discovered a potential vulnerability where players could use any PlaceholderAPI placeholder in /clan setslogan and /clan chat, causing it to be parsed. This has been fixed. - Internal placeholders now use the {placeholder} format instead of %placeholder% for better clarity and to distinguish them from PlaceholderAPI placeholders.
    10 downloads

Similar projects

Plugin →