TribeCraft Wiki
EN PT ES

Bank

The Bank addon adds a shared economy balance to clans in UltimateClans.

Clan members can deposit money from their personal economy balance into the clan bank, withdraw money from the clan bank, and view the current clan bank balance. These actions can be controlled through UltimateClans clan-role permissions.

The addon also provides graphical interfaces for viewing the bank, depositing money, and withdrawing money when UltimateClans GUI support is available.

This guide was prepared from the Bank addon source code supplied for UltimateClans. Where the source code does not define an operational detail, this guide does not invent one.


Requirements

The Bank addon checks the following requirements during startup:

  • UltimateClans 8.19.0 or newer.
  • A compatible economy implementation available through the UltimateClans Money API.
  • The Adventure integration provided by UltimateClans must initialize correctly.
  • Config.Bank.enabled must be enabled.

If the installed UltimateClans version is older than 8.19.0, the addon disables itself.

If no economy implementation is available, the addon also disables itself.

When the selected economy implementation reports a plugin name that matches an enabled UltimateClans Economy Extension, Bank checks the extension version. If it is older than 2.0, Bank writes a warning to the console.

PlaceholderAPI is optional. When PlaceholderAPI is installed and enabled, Bank registers its clanbank placeholder expansion.


Files

Bank creates and uses its own addon files.

The source confirms these files:

  • config.yml
  • commands.yml
  • gui.yml
  • language/Lang_<language>.yml

The configured language is selected through:

Config.language

If the configured language cannot be resolved, the addon falls back to EN.

The addon also contains logic for downloading supported language files when they are missing.


Getting started

After Bank is loaded successfully, players can use the Bank command through the UltimateClans command system.

The default Bank command alias is:

bank

The main usage is therefore:

/clan bank

The exact main UltimateClans command can be changed by UltimateClans itself, so the addon internally resolves the configured clan command rather than hard-coding only /clan.

Running Bank without a subcommand displays the available Bank subcommands.

The source defines three Bank actions:

add
withdraw
view

Commands

Bank help

/clan bank

Displays Bank help and the available subcommands.

The help alias defaults to:

help

The displayed command text, usage messages, success messages, error messages, and aliases are configurable in commands.yml.


Deposit money

/clan bank add <value>

Deposits money from the player's personal economy balance into the clan bank.

Example:

/clan bank add 5000

Before the transaction is accepted, Bank checks that:

  1. The player belongs to a clan.
  2. The player has the configured clan-role permission for adding money.
  3. The supplied value is at least 1.
  4. The player has enough money in the selected economy implementation.
  5. The resulting clan bank balance does not exceed the clan's current Bank limit.

The default clan-role permission used by this action is:

Bank-Add

If the transaction passes the checks, Bank requests the clan bank change and withdraws the specified value through the UltimateClans Money API.


Withdraw money

/clan bank withdraw <value>

Withdraws money from the clan bank to the player's personal economy balance.

Example:

/clan bank withdraw 2500

Before the transaction is accepted, Bank checks that:

  1. The player belongs to a clan.
  2. The player has the configured clan-role permission for withdrawals.
  3. The supplied value is at least 1.
  4. The clan bank contains at least the requested amount.

The default clan-role permission used by this action is:

Bank-Withdraw

The Bank source uses the UltimateClans Money API to add the withdrawn amount to the player's economy balance and requests the corresponding clan bank change.


View the clan bank

/clan bank view

Displays the current clan bank balance.

The default clan-role permission used by this action is:

Bank-View

When GUI support is available, Bank can open its graphical interface instead of only displaying the balance.

The GUI behavior is controlled by:

Config.Bank.forge_open-gui

The spelling forge_open-gui is the exact configuration key used by the addon and should not be corrected.

The GUI can also be explicitly requested with:

/clan bank view -gui

Command configuration

The command configuration is stored in:

commands.yml

The general Bank command settings are under:

Commands.player

The source defines these keys:

Commands.player.permission
Commands.player.alias
Commands.player.cooldown
Commands.player.value
Commands.player.disabled_worlds
Commands.player.disabled_regions

The defaults include:

Commands:
  player:
    permission: uclans.player.bank
    alias: bank
    cooldown: 0
    value: 0.0
    disabled_worlds: []
    disabled_regions: []

The default Bukkit-style command permission is:

uclans.player.bank

The Bank subcommands are configured below:

Commands.bank

The source defines configuration for:

Commands.bank.help
Commands.bank.add
Commands.bank.withdraw
Commands.bank.view

Each subcommand can define aliases and its displayed show, usage, error, and success messages.

Default aliases are:

Action Default alias
Help help
Add add
Withdraw withdraw
View view

Permission system

Bank uses two different permission layers.

Main command permission

The main command permission comes from commands.yml:

Commands.player.permission: uclans.player.bank

Its default value is:

uclans.player.bank

This permission belongs to the normal command permission system.


Clan-role permissions

Bank also creates action-specific permissions in the UltimateClans moderation/role system.

The configuration section is:

Config.Permissions

The source defines three Bank permissions:

Bank-Add
Bank-Withdraw
Bank-View

Default configuration:

Config:
  Permissions:

    withdraw:
      name: Bank-Withdraw
      default_value: true
      applicable_roles:
        - member
        - moderator
        - admin

    add:
      name: Bank-Add
      default_value: true
      applicable_roles:
        - member
        - moderator
        - admin

    view:
      name: Bank-View
      default_value: true
      applicable_roles:
        - member
        - moderator
        - admin

When Bank starts, it reads each configured permission and applies its default value to the listed default UltimateClans roles when those roles exist.

Permission names are normalized internally by replacing spaces and dots with hyphens.

For example:

Bank.View

would internally become:

Bank-View

Administrators should be careful when changing these values because they directly affect the clan-role permission system.


Main configuration

Bank's primary configuration is stored in:

config.yml

Language

Config.language: EN

Controls the Bank language selection.


Enable or disable Bank

Config.Bank.enabled: true

When this is false, Bank disables itself during startup.


Force/open GUI behavior

Config.Bank.forge_open-gui: true

When enabled, /clan bank view can open the Bank GUI when UltimateClans GUI support is available.

The GUI can also be explicitly requested using:

/clan bank view -gui

Number formatting

Config.Bank.format: "#,##0"

Bank uses this format when displaying monetary values through its formatting method.


Bank GUI amount values

The Bank GUI amount selector is controlled through:

Config.Bank.values

The source defines these keys:

Config.Bank.values.init
Config.Bank.values.min
Config.Bank.values.max
Config.Bank.values.add
Config.Bank.values.add2
Config.Bank.values.remove
Config.Bank.values.remove2

Default values:

Config:
  Bank:
    values:
      init: 0.0
      min: 1000.0
      max: 100000.0
      add: 1000.0
      add2: 10000.0
      remove: 1000.0
      remove2: 10000.0

Meaning within the GUI:

Key Default Purpose
Config.Bank.values.init 0.0 Initial selected amount
Config.Bank.values.min 1000.0 Minimum selector value
Config.Bank.values.max 100000.0 Maximum selector value
Config.Bank.values.add 1000.0 First increment
Config.Bank.values.add2 10000.0 Second increment
Config.Bank.values.remove 1000.0 First decrement
Config.Bank.values.remove2 10000.0 Second decrement

These values are used by the graphical amount selector. Direct /clan bank add <value> and /clan bank withdraw <value> commands validate the value supplied to the command separately.


Clan bank limits

Bank can restrict the maximum clan bank balance according to the clan level.

Enable or disable limits with:

Config.Bank.limit.enabled

The default is:

Config.Bank.limit.enabled: true

When this setting is false, the addon returns a practically unrestricted maximum based on Java's Double.MAX_VALUE.

Limits are configured under:

Config.Bank.limit.list

The format implemented by the source is:

'<BANK_LIMIT>': <REQUIRED_CLAN_LEVEL>

For example:

Config:
  Bank:
    limit:
      enabled: true
      list:
        '10000': 1
        '50000': 5
        '100000': 10

This means:

  • A clan that meets level 1 can qualify for the 10000 limit.
  • A clan that meets level 5 can qualify for the 50000 limit.
  • A clan that meets level 10 can qualify for the 100000 limit.

Bank evaluates every configured entry for which:

clan level >= required level

and selects the largest matching Bank limit.

The generated default configuration creates a very large limit:

Integer.MAX_VALUE - 1

available from clan level 0.

If limits are enabled but no configured entry qualifies, the implementation falls back to:

1.0

as the returned limit.


Graphical interface

Bank contains graphical interfaces for:

  • Bank home.
  • Deposit selection.
  • Withdrawal selection.

The GUI configuration is stored in:

gui.yml

The source contains GUI groups such as:

Bank.home_bank
Bank.bank_add
Bank.bank_withdraw

The GUI supports configuration for:

  • menu rows;
  • opening sounds;
  • item materials;
  • item amounts;
  • item names;
  • item lore;
  • textures;
  • glow;
  • slots;
  • fill slots;
  • NBT values;
  • CustomModelData/model values.

The Bank home GUI presents actions for depositing and withdrawing money.

The add and withdraw GUIs use the configured Bank amount values to increase or decrease the selected transaction amount before confirmation.


General UltimateClans menu icon

Bank registers an icon into the UltimateClans General GUI.

Its settings are stored under:

Config.Icon

The source defines these keys:

Config.Icon.click_sound
Config.Icon.material
Config.Icon.name
Config.Icon.texture
Config.Icon.lore
Config.Icon.glow
Config.Icon.slot
Config.Icon.mimeslots
Config.Icon.nbt.string
Config.Icon.model
Config.Icon.left_click_action
Config.Icon.right_click_action

Default material:

SUNFLOWER

Default name:

<green>Bank of Clan.

Default slot:

40

The default lore includes the clan bank balance:

%uclans_money_currency%%uclans_bank_balance%

The default left-click and right-click actions resolve to the Bank view command with the -gui option.

The mimeslots configuration supports values such as:

ALL
TOP
BOTTOM
BORDER

or an explicit numeric slot list.


Economy behavior

Bank does not hard-code a single economy plugin.

Instead, it requests the preferred or first available implementation from:

UltimateClans Money API

The addon uses that implementation for operations such as:

  • checking whether a player has enough money;
  • withdrawing money from a player;
  • adding money to a player;
  • reading a player's current money balance.

If no implementation is available during Bank startup, the addon disables itself.


Transaction protection

The Bank implementation contains a short transaction timing guard using a lastWithdraw map and a 1000 millisecond interval in several money/bank operations.

This is part of the internal transaction protection logic and is not exposed as a user configuration option in the supplied source.


Placeholders

When PlaceholderAPI is enabled, Bank registers this PlaceholderAPI expansion identifier:

clanbank

The supplied Bank source implements two addon-specific identifiers.

Clan bank limit

%clanbank_limit%

Returns the current clan's Bank limit formatted through Bank's configured number formatter.

If the player does not belong to a clan, the implementation returns:

0

Formatted clan bank limit

%clanbank_limit_formated%

Returns the current clan's Bank limit using the addon's shortened number formatter.

If the player does not belong to a clan, it returns:

0

The spelling:

formated

is part of the real placeholder identifier and should be preserved exactly.


UltimateClans placeholders used by Bank

The supplied Bank source also references UltimateClans placeholders in GUI/configuration text.

Examples present in the source include:

%uclans_bank_balance%
%uclans_money_currency%
%uclans_money_current_formated%
%uclans_money_player%
%uclans_player%
%uclans_player_head%
%uclans_banner%
%uclans_tag_color%

These are referenced by Bank's configuration or language/GUI definitions. They are not additional clanbank identifiers implemented by BankPlaceholderManager.


Logger integration

Bank integrates with the UltimateClans clan logger.

Logger settings are available under:

Config.logger

The source defines:

Config.logger.enable_colors
Config.logger.plugin_material
Config.logger.plugin_name
Config.logger.events.ClanBankAddEvent
Config.logger.events.ClanBankWithdrawEvent

Defaults include:

Config:
  logger:
    enable_colors: true
    plugin_material: SUNFLOWER
    plugin_name: Bank

    events:
      ClanBankAddEvent: true
      ClanBankWithdrawEvent: true

When enabled, Bank's listeners add clan log entries for deposits and withdrawals.

The log entry uses the configured:

Config.logger.plugin_name
Config.logger.plugin_material

Events and synchronization

The supplied Bank source defines:

ClanBankAddEvent
ClanBankWithdrawEvent

Bank also interacts with UltimateClans':

ClanBankChangeEvent

When Bank processes clan bank changes, the implementation also requests an UltimateClans clan synchronization update using:

RedisType.CLANUPDATEUUID

This makes the Bank addon participate in the UltimateClans synchronization system.


Examples

Deposit 5,000

/clan bank add 5000

Bank checks clan membership, Bank-Add, the player's economy balance, the value, and the clan Bank limit before processing the deposit.


Withdraw 2,500

/clan bank withdraw 2500

Bank checks clan membership, Bank-Withdraw, the value, and the current clan bank balance before processing the withdrawal.


View the balance

/clan bank view

Displays the current clan bank balance, unless the configured GUI behavior causes the graphical Bank to open.


Explicitly open the GUI

/clan bank view -gui

Requests the graphical Bank interface when GUI support is available.


Change which clan roles may deposit

The default deposit permission configuration is:

Config:
  Permissions:
    add:
      name: Bank-Add
      default_value: true
      applicable_roles:
        - member
        - moderator
        - admin

An administrator can modify applicable_roles to control which default clan roles receive the permission when Bank applies its permissions.


Create progressive Bank limits

Example:

Config:
  Bank:
    limit:
      enabled: true
      list:
        '10000': 1
        '25000': 3
        '50000': 5
        '100000': 10

Bank selects the highest configured limit whose required clan level is satisfied.


Troubleshooting

Bank disables itself during startup

Check the server console.

The supplied source shows that Bank can disable itself when:

  • UltimateClans is older than 8.19.0;
  • the UltimateClans compatibility/version check fails;
  • no economy implementation is available;
  • Adventure initialization fails;
  • Config.Bank.enabled is false.

Economy implementation not found

Bank requires an economy implementation exposed through the UltimateClans Money API.

If the console reports:

Economy implementation not found

verify that your UltimateClans economy setup is available and recognized.

The Bank source itself does not define installation instructions for a particular third-party economy plugin.


Players can run /clan bank but cannot deposit

Check both permission layers.

Main command permission:

uclans.player.bank

Clan-role action permission:

Bank-Add

Also verify that:

  • the player belongs to a clan;
  • the deposit value is at least 1;
  • the player has enough personal money;
  • the resulting bank balance does not exceed the clan Bank limit.

Players cannot withdraw

Check:

uclans.player.bank

and:

Bank-Withdraw

Also verify that the clan bank contains at least the requested amount.


Players cannot view the bank

Check:

uclans.player.bank

and:

Bank-View

Also verify that the player belongs to a clan.


Deposit is rejected because of a limit

Check:

Config.Bank.limit.enabled

and:

Config.Bank.limit.list

The resulting clan bank balance cannot exceed the limit selected for the clan's current level.


/clan bank view does not open the GUI

Check that UltimateClans GUI support is available.

Then check:

Config.Bank.forge_open-gui

You can also explicitly request the GUI with:

/clan bank view -gui

Bank placeholders do not work

The clanbank PlaceholderAPI expansion is registered only when PlaceholderAPI is enabled when Bank starts.

Verify PlaceholderAPI is active and test:

%clanbank_limit%

and:

%clanbank_limit_formated%

Language file problems

Bank uses:

language/Lang_<language>.yml

and reads the selected language from:

Config.language

If the configured language cannot be resolved, the source falls back to EN.


Technical reference

This guide was derived from the supplied Bank addon source, including:

ClanBank.java
PlaceholderHook.java
commands/BankCommand.java
listeners/ClanBankListeners.java
manager/AddonFiles.java
manager/AddonGuiManager.java
manager/BankGui.java
manager/BankManager.java
manager/BankPlaceholderManager.java
manager/EnumFiles/Commands.java
manager/EnumFiles/Config.java
manager/EnumFiles/Gui.java
manager/EnumFiles/Lang.java
events/ClanBankAddEvent.java
events/ClanBankWithdrawEvent.java
src/main/resources/plugin.properties

The supplied plugin.properties declares:

depend: UltimateClans
description=ClanBank Addon.

Some deployment details, such as the exact physical addon installation directory or the distribution process used to install the addon package, are not defined by the supplied Bank source and therefore are intentionally not asserted in this guide.

Technical Reference