šŸ’øEconomy

Coral features an all in one economy core, allowing you to create unlimited custom economies to use throughout your server. Each currency will contain basic eco commands, which use the same name as your economy, as well as a leaderboard.

Creating an economy

In order to create an economy you must head over to CoralPrison/modules/economy/currencies and copy + paste the current tokens.yml, however you must rename this to the whatever you wish to call your new eco. Inside of the config you will find a base-command: field, where the value specified is what will be used to access commands for your new eco. You can also specify a list of aliases for this command. You may also specify commands which you can enable or disable based on your needs under the sub-commands: section.

Configuring leaderboard

In order to configure a leaderboard for an economy you must first navigate to your economy config via CoralPrison/modules/economy/currencies/<currency_name>.yml and scroll to the "top-menu" section. This works just the same as any other Abyss menu system, with one extra field called top-slots:, which takes in an array slots where the leaderboard heads should be displayed.

You may change the interval in which the top leaderboard updates in CoralPrisons/modules/economy/configs/settings.yml.

Configuration Files

configs/settings.yml
leaderboards-update-interval: 300 #seconds
currencies/tokens.yml
base-command: "tokens"
description: "The tokens base command"
aliases:
    - "coraltokens"
    - "coraltoken"
    - "ctokens"
    - "ctoken"
    - "token"

withdraw-item:
    enchanted: true
    material: "GOLD_NUGGET"
    name: "&6&l[&e&l!&6&l] &e%amount%x Token(s) &7(Right-Click)"
    lore:
        - " "
        - "&eInformation"
        - "&eā†’ &7Tokens: &f%amount%x"
        - "&eā†’ &7From: &f%player%"
        - " "
        - "&7&o(( Right-Click to redeem &f&o%amount%x&7&o token(s)! ))"

sub-commands:
    help: true
    give: true
    take: true
    set: true
    pay: true
    top: true
    recalc: true
    balance: true
    withdraw: true
    paytoggle: true

menus:
    "top-menu":
        title: "&8&lTOKENS LEADERBOARD"
        rows: 3
        top-slots: [10,11,12,13,14,15,16]
        borders:
            "gray":
                material: "GRAY_STAINED_GLASS_PANE"
                name: " "
                lore: [ ]
                slots:
                    - "0-26"
            "orange":
                material: "ORANGE_STAINED_GLASS_PANE"
                name: " "
                lore: [ ]
                slots:
                    - "9-17"
        invalid-item:
            material: "PLAYER_HEAD"
            skull: "MHF_Question"
            name: "&4&l[&c&l!&4&l] &c???"
            lore: [ ]
        valid-item:
            material: "PLAYER_HEAD"
            skull: "%player%"
            name: "&6&l[&e&l!&6&l] &e%player% &7(#%rank%)"
            lore:
                - " "
                - "&eInformation"
                - "&eā†’ &7Rank: &f#%rank%"
                - "&eā†’ &7Tokens: &f%amount%x"
                - " "
                - "&7&o(( &f&o%player%&7&o has &f&o%amount%x&7&o tokens! ))"
        stats-item:
            slot: 22
            material: "PLAYER_HEAD"
            skull: "%player%"
            name: "&6&l[&e&l!&6&l] &e%player% &7(#%rank%)"
            lore:
                - " "
                - "&eInformation"
                - "&eā†’ &7Rank: &f#%rank%"
                - "&eā†’ &7Tokens: &f%amount%x"
                - " "
                - "&7&o(( You have &f&o%amount%x&7&o tokens! ))"

messages:
    "no-permission":
        sound:
            enabled: true
            value: "FIZZ"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&c&lCoral&4&lPrisons &8&lā†’ &7You do not have &cpermission&7 to perform this action."
    "balance":
        sound:
            enabled: true
            value: "BLOCK_NOTE_PLING"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&e&lCoral&6&lPrisons &8&lā†’ &7You have &e%amount%x&7 tokens."
    "balance-other":
        sound:
            enabled: true
            value: "BLOCK_NOTE_PLING"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&e&lCoral&6&lPrisons &8&lā†’ &e%player%&7 has &e%amount%x&7 tokens."
    "given-sender":
        sound:
            enabled: true
            value: "BLOCK_NOTE_PLING"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&e&lCoral&6&lPrisons &8&lā†’ &7You have given &e%player% %amount%x&7 token(s)."
    "given-receiver":
        sound:
            enabled: true
            value: "BLOCK_NOTE_PLING"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&e&lCoral&6&lPrisons &8&lā†’ &7You have received &e%amount%x&7 token(s)."
    "taken-sender":
        sound:
            enabled: true
            value: "BLOCK_NOTE_PLING"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&e&lCoral&6&lPrisons &8&lā†’ &7You have taken &e%amount%x&7 token(s) from &e%player%&7."
    "taken-receiver":
        sound:
            enabled: true
            value: "BLOCK_NOTE_PLING"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&e&lCoral&6&lPrisons &8&lā†’ &e%amount%x&7 token(s) have been taken from you."
    "set-sender":
        sound:
            enabled: true
            value: "BLOCK_NOTE_PLING"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&e&lCoral&6&lPrisons &8&lā†’ &7You have set &e%player%'s&7 token balance to &e%amount%x&7."
    "set-receiver":
        sound:
            enabled: true
            value: "BLOCK_NOTE_PLING"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&e&lCoral&6&lPrisons &8&lā†’ &7Your token balance was set to &e%amount%x&7."
    "invalid-player":
        sound:
            enabled: true
            value: "FIZZ"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&c&lCoral&4&lPrisons &8&lā†’ &7You have specified an &cinvalid&7 player."
    "invalid-number":
        sound:
            enabled: true
            value: "FIZZ"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&c&lCoral&4&lPrisons &8&lā†’ &7You have specified an &cinvalid&7 number."
    "not-enough":
        sound:
            enabled: true
            value: "FIZZ"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&c&lCoral&4&lPrisons &8&lā†’ &7You don't have enough &ctokens&7 to do this."
    "payments-toggled":
        sound:
            enabled: true
            value: "FIZZ"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&c&lCoral&4&lPrisons &8&lā†’ &c%player%&7 isn't accepting payments at this moment."
    "payment-sent":
        sound:
            enabled: true
            value: "BLOCK_NOTE_PLING"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&e&lCoral&6&lPrisons &8&lā†’ &7You sent &e%amount%x&7 token(s) to &e%player%&7."
    "payment-received":
        sound:
            enabled: true
            value: "BLOCK_NOTE_PLING"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&e&lCoral&6&lPrisons &8&lā†’ &7You received &e%amount%x&7 token(s) from &e%player%&7."
    "payments-enabled":
        sound:
            enabled: true
            value: "BLOCK_NOTE_PLING"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&e&lCoral&6&lPrisons &8&lā†’ &7You have &eenabled&7 token payments from other players."
    "payments-disabled":
        sound:
            enabled: true
            value: "FIZZ"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&c&lCoral&4&lPrisons &8&lā†’ &7You have &cdisabled&7 token payments from other players."
    "top-updating":
        sound:
            enabled: true
            value: "BLOCK_NOTE_PLING"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&e&lCoral&6&lPrisons &8&lā†’ &7Starting recalculation of the &eTokens&7 leaderboard."
    "top-updated":
        sound:
            enabled: true
            value: "BLOCK_NOTE_PLING"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&e&lCoral&6&lPrisons &8&lā†’ &7Successfully recalculated the &eTokens&7 leaderboard. &7(Took %time%ms)"
    "redeemed-note":
        sound:
            enabled: true
            value: "BLOCK_NOTE_PLING"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&e&lCoral&6&lPrisons &8&lā†’ &7You have redeemed &e%amount%x&7 token(s)."
    "admin-help":
        sound:
            enabled: true
            value: "BLOCK_NOTE_PLING"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&6&m------------------------------------------"
                - " "
                - "&e&lCoral&6&lPrisons &8&lā†’ &eTokens Admin Help"
                - "&7&oMade by &f&oRelocation#0001&7&o."
                - " "
                - "&7&o<> = Required"
                - "&7&o[] = Optional"
                - " "
                - "&e&lADMIN COMMANDS:"
                - "&e&lā†’ &7/tokens give <player> <amount>"
                - "&e&lā†’ &7/tokens take <player> <amount>"
                - "&e&lā†’ &7/tokens set <player> <amount>"
                - "&e&lā†’ &7/tokens recalc"
                - " "
                - "&e&lPLAYER COMMANDS:"
                - "&e&lā†’ &7/tokens pay <player> <amount>"
                - "&e&lā†’ &7/tokens withdraw <amount>"
                - "&e&lā†’ &7/tokens balance [player]"
                - "&e&lā†’ &7/tokens paytoggle"
                - "&e&lā†’ &7/tokens help"
                - "&e&lā†’ &7/tokens top"
                - " "
                - "&6&m------------------------------------------"
    "player-help":
        sound:
            enabled: true
            value: "BLOCK_NOTE_PLING"
            volume: 1
            pitch: 1
        message:
            enabled: true
            value:
                - "&6&m------------------------------------------"
                - " "
                - "&e&lCoral&6&lPrisons &8&lā†’ &eTokens Help"
                - "&7&oMade by &f&oRelocation#0001&7&o."
                - " "
                - "&7&o<> = Required"
                - "&7&o[] = Optional"
                - " "
                - "&e&lCOMMANDS:"
                - "&e&lā†’ &7/tokens pay <player> <amount>"
                - "&e&lā†’ &7/tokens withdraw <amount>"
                - "&e&lā†’ &7/tokens balance [player]"
                - "&e&lā†’ &7/tokens paytoggle"
                - "&e&lā†’ &7/tokens help"
                - "&e&lā†’ &7/tokens top"
                - " "
                - "&6&m------------------------------------------"

Last updated