Paste #64800: Wallets in Tablist

Date: 2020/01/31 19:57:01 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19


Wallet_Tablist:
  type: world
  debug: false
  wallets:
    1: '<&c><&n>Leather<&sp>Wallet<&r>'
    2: '<&7><&n>Iron<&sp>Wallet<&r>'
    3: '<&6><&n>Gold<&sp>Wallet<&r>'
    4: '<&b><&n>Diamond<&sp>Wallet<&r>'
    5: '<&d><&n>Nether<&sp>Star<&sp>Wallet!<&r>'
  events:
    # sets a header in the TAB LIST which displays the player's money and wallet type, updates when they log on and when their money changes
    on player join:
      - if !<player.has_flag[wallet]>:
        - flag <player> wallet:1
      - adjust <player> "tab_list_info:<&2><&o>Money:<&r><&a> <player.formatted_money><&2> - <&r><script.yaml_key[wallets.<player.flag[wallet]>].parsed>"
    on player flag money changed:
      - adjust <player> "tab_list_info:<&2><&o>Money:<&r><&a> <player.formatted_money><&2> - <&r><script.yaml_key[wallets.<player.flag[wallet]>].parsed>"
    on player flag wallet changed:
      - adjust <player> "tab_list_info:<&2><&o>Money:<&r><&a> <player.formatted_money><&2> - <&r><script.yaml_key[wallets.<player.flag[wallet]>].parsed>"