[DELETED}TokensPlus icon

[DELETED}TokensPlus -----

[DELETED}




Fix Api-Version bug for <1.17.
----------, Dec 31, 2021

Thanks to @Sixsoul for sharing information on this bug to me.

I've updated TokensPlus to properly redeem a withdrawn token item if the player attempted to refine the item in their off-hand slot.
----------, Dec 31, 2021

Updated the plugin configuration to use the latest api-version of Spigot and built off the latest Spigot SNAPSHOT (1.18-R0.1)
----------, Dec 13, 2021

With this update, I have added additional customization options for the GUI elements of the TokensPlus plugin. See the updated config.yml for more information. In summary, users will now be able to change the default items that appear in the TokensPlus shop and the permission-based shops.

Additionally, users will be able to customize the item cost and can/cannot afford messages that appear in the shops as well.

[​IMG]
----------, Apr 22, 2021

Thanks to @korinocho for partially suggesting this feature!

With this update, I have added additional customization options for messaging elements of the TokensPlus plugin. See the updated messages.yml for more information. Furthermore, I added messages to be sent to the command sender for the /token add , /token remove and /token set commands.

Additionally, I discovered I had improper permission checks for the /token addall and /token reload commands. These should be correct now.
----------, Apr 21, 2021

Thanks to @korinocho for bringing these performance issues to my attention.I realized with his server's use case, that my initial MySQL implementation was faulty (and most likely contained memory leaks).

With this update, I've refactored the MySQL implementation to leverage HikariCP for building out a proper connection pool, addressed unclosed connections, statements and results and even fixed a small bug with the UpdateChecker implementation as well.

Thanks to @korinocho for help with testing these changes on his server. He was able to provide these screenshots showing the performance before (version 2.8.11) and after (version 2.8.12):

BEFORE
[​IMG]
[​IMG]

AFTER
[​IMG]
[​IMG]
----------, Apr 20, 2021

With this update, I've added a new command to TokensPlus: /token withdraw. In adding this command, I've updated the config.yml and messages.yml.

This command allows players to withdraw TokensPlus tokens from their balances into physical items.

Right-clicking a TokensPlus token item will allow the player to redeem 1 of these items. Shift Right-Clicking will allow the player to redeem the entire stack.

Here is how things look with the default configuration:
[​IMG]
----------, Apr 18, 2021

Thanks to @Alagesia for providing this suggestion!

With this update, I've added a new configuration option to the shops.yml file. This option, 'shouldGiveItemOnPurchase' will allow you configure for each item in each shop whether or not the user should receive the item displayed when they purchase it.

If the option is true, the item will receive the item display in their inventory. Otherwise, the item will not be added to their inventory.
----------, Apr 15, 2021

I mistakenly pushed the 2.5.10 version out without updating the plugin.yml version. This was causing some oddities with my update checker. I've fixed that issue with this version.

Furthermore, I have added two new placeholders:
  • %tokensplus_tokens_commas%: Gives token amount for player separated by commas (e.g., 1200 -> 1,200)
  • %tokensplus_tokens_formatted%: Gives token amount for player with the appropriate single-character suffix (e.g., 1200 -> 1.20K)
----------, Apr 12, 2021

Thanks to @clipsy1 for providing this suggestion!

With this version, I've updated the main /token command to have an alias /tokensplus to prevent conflicts with other plugins that use a token command.
----------, Apr 11, 2021

With this version of TokensPlus, I have added a new source for players to earn tokens by breaking blocks.

I've updated the drops.yml to include a new section for 'blocks'. This section is structured similarly to how the killing mobs section is. You can add any and all block types to this section, configure their drop chances and the amount of tokens rewarded for each block individually.

I've also added a new token multiplier permission, similar to the killing mobs one, tokensplus.blockbreakmultiplier.<number>. Here is the latest drops.yml:

Code (YAML):
#---------------------------------------#
# TokensPlus - Mob Drops                |
#---------------------------------------#
# Drop chance is set as a double value. This configuration defaults the dropChance for each mob to be 5% (5.0).
# For example, if you wanted the drop chance to be 99.99%, then dropChance should be set as 99.99.
drops
:
  # If enabled, the player will receive a message when the tokens are added to their balance from a mob drop
  shouldMessageOnDrop
: true

  # Defines the maximum value for the token drop multiplier
  # If a player has a permission that is higher than this value, their multiplier will be this value.
  # For example, player has tokensplus.dropsmultiplier.200, their multiplier will be x100.
  tokenMultiplierMaxValue
: 100

  # Passive mobs
  BAT
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  CAT
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  CHICKEN
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  COD
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  COW
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  DONKEY
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  FOX
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  HORSE
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  MOOSHROOM
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  MULE
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  OCELOT
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  PARROT
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  PIG
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  PIGLIN
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  POLAR_BEAR
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  PUFFERFISH
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  RABBIT
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  SALMON
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  SHEEP
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  SKELETON_HORSE
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  SNOW_GOLEM
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  SQUID
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  STRIDER
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  TROPICAL_FISH
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  TURTLE
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  VILLAGER
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  WANDERING_TRADER
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10

  # Neutral mobs
  BEE
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  CAVE_SPIDER
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  DOLPHIN
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  ENDERMAN
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  IRON_GOLEM
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  LLAMA
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  PANDA
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  SPIDER
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  WOLF
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  ZOMBIFIED_PIGLIN
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10

  # Hostile mobs
  BLAZE
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  CHICKEN_JOCKEY
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  CREEPER
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  DROWNED
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  ELDER_GUARDIAN
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  ENDERMITE
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  EVOKER
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  GHAST
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  GUARDIAN
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  HOGLIN
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  HUSK
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  MAGMA_CUBE
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  PHANTOM
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  PIGLIN_BRUTE
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  PILLAGER
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  RAVAGER
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  RAVAGER_JOCKEY
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  SHULKER
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  SILVERFISH
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  SKELETON
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  SKELETON_HORSEMAN
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  SLIME
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  SPIDER_JOCKEY
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  STRAY
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  VEX
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  VINDICATOR
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  WITCH
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  WITHER_SKELETON
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  ZOGLIN
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  ZOMBIE
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  ZOMBIE_VILLAGER
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10

  # Boss mobs
  ENDER_DRAGON
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  WITHER
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10

  # Non-Naturally Spawning mobs
  GIANT
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  ZOMBIE_HORSE
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  ILLUSIONER
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10

#---------------------------------------#
# TokensPlus - Block Drops              |
#---------------------------------------#
# These configuration options are defined exactly the same as above.
# However, this is intended for adding drop chances to different blocks when they are broken.
blocks
:

  # If enabled, the player will receive a message when the tokens are added to their balance from a block break
  shouldMessageOnBlockBreak
: true

  # Defines the maximum value for the token block break multiplier
  # If a player has a permission that is higher than this value, their multiplier will be this value.
  # For example, player has tokensplus.blockbreakmultiplier.200, their multiplier will be x100.
  tokenMultiplierMaxValue
: 100

  # Define the block types here.
  STONE
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
  DIRT
:
    enabled
: false
    dropChance
: 5.0
    tokensDropped
: 10
----------, Apr 8, 2021

With this version of TokensPlus, I've added metrics tracking to the plugin leveraging bStats. This will allow me to get a better understanding on how Spigot users are using this plugin.

In hindsight, I should have added metrics support sooner (more so from the beginning of the project). Been meaning to add this support recently, but have been swamped with other work.
----------, Apr 6, 2021

Thanks to "PukingUnicorns" for finding this issue!

Found that the %playername% token in the commands to dispatch list was pulling in the player's permission group prefix. This was causing issues with the commands being dispatched. With this version, it should only pull the actual player's name and not their prefix.
----------, Apr 5, 2021

Thanks to "PukingUnicorns" for finding this bug!

Realized that because I had been copying the default configurations for 'shops.yml', even if an item was removed from this YAML, it would still appear in the /token shop inventories. With this updated version, it should no longer do this.
----------, Apr 5, 2021

With this update, I have addressed a handful of bugs and/or oversights on my part:
  • Addressed an issue where the /token remove command could remove more tokens than were in the player's balance. The sender will now receive a message (see messages.yml) when they try to use the remove command to do just this.
  • Improved the drop chance implementation that I had built out in version 1.0.0. Now, the 'dropChance' property in the drops.yml file will convert the value directly into the drop chance % (For example, 5.0 = 5% drop chance). This should make the drop chance mechanic easier to understand and allow for any sort of percentage chance for each mob.
  • Updated the /token messages to include the /token reload command, as well as adding /token reload to the Tab Completer logic.
I've made changes to config.yml, messages.yml and drops.yml as part of this update. You can find the latest versions here: https://gist.github.com/CMPSCjg/d8969a963ed047f0df538ae1bbef477c
----------, Mar 28, 2021

Thanks to everyone who had sent me screenshots and information on what Minecraft versions their server was running on!

When I built the first version of TokensPlus, I did not realize that there was a significant change to the ItemStack/Material logic starting with 1.13.x. Because of this, how I was constructing the items was not going to work for earlier versions of Minecraft (< 1.13.x).

With this update, I have been able to update the ItemStack/Material logic to work properly for Legacy versions of Minecraft. I tried my best to test all earlier versions (1.8.8, 1.9.4, 1.10.2, 1.11.2 and 12.2) and found that the plugin was working as intended (just as it was on the latest version of Minecraft).

Please continue to report any and all issues with the plugin and I will try my best to resolve things!
----------, Mar 27, 2021

Thanks to @IPenguinI for pointing out a flaw in my permission-based shops implementation.

For some reason, I didn't force that OPs would have access to all permission-based shops. With this version ( 2.2.4), operators will automatically have access to all permission-based shops.
----------, Mar 27, 2021

With this update, I have added the following
  • The /token addall command (requires tokensplus.addall permission)
  • Tab completion for all commands and configured shops for /token shop <shopname>
  • If enabled, a logs directory that will contain daily log files for interactions involving changes to player token balances (when a player get tokens, spends tokens, etc)
  • A handful of little bugfixes and/or code clean-up

I've made changes to the config.yml and messages.yml as part of this update. You can find the latest versions here: https://gist.github.com/CMPSCjg/d8969a963ed047f0df538ae1bbef477c

Going forward, I have decided to bundle newer feature and bugfix versions into one larger release instead of the smaller, individual releases I have done thus far. I feel it would be best to provide one substantial update instead of a handful of smaller ones. Hence this JAR being 2.2.3 compared to the previous release of 2.0.1.
----------, Mar 26, 2021

With this update, I have modified the 'More information' item in the TokensPlus shop inventories to be a BOOK instead of an ORANGE_GLASS_STAINED_PANE. Not sure why I thought ORANGE_GLASS_STAINED_PANE was a good item for 'More information' *shrugs*. I have also added additional content to the lore of this item.

Additionally, I have improved the default shops.yml provided to give users a better understanding of the structure that is needed to define newer shops.

Here is the latest version of shops.yml:
## TokensPlus - Shops
shop:

# ---------------------------------------------------------------------------------
# - TokensPlus - Default Shop Configuration
# - Players will see this shop when they use the /token shop command.
# - DO NOT MODIFY THE SECTION NAME (TOKENSPLUS) OR REMOVE THE SECTION. OTHERWISE, THE MAIN /TOKEN SHOP COMMAND WILL THROW ERRORS!
# ---------------------------------------------------------------------------------
# You can create any number of shop pages. Just follow the structure provided and add one to the last page number
# For example, if you wanted to add another page to the default config.yml, you would add a page3 section.
# The numbers after the 'items' section refers to the slot number in the TokensPlus shop inventory.
# All slot numbers are available, starting from 0, with the exception of slots 48, 49 and 50 (0-47, 51-53).
# For 'material', refer here for the material names: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
# For 'enchants', refer here for the enchantment names: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/enchantments/Enchantment.html
tokensplus:
page0:
items:
11:
material: GOLDEN_SWORD
amount: 1
name: "&eGold Sword"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 5
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
12:
material: GOLDEN_HELMET
amount: 1
name: "&eGold Helmet"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 10
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
13:
material: GOLDEN_CHESTPLATE
amount: 1
name: "&eGold Chestplate"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 20
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
14:
material: GOLDEN_LEGGINGS
amount: 1
name: "&eGold Leggings"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 40
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
15:
material: GOLDEN_BOOTS
amount: 1
name: "&eGold Boots"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 80
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
20:
material: DIAMOND_SWORD
amount: 1
name: "&bDiamond Sword"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 10
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
21:
material: DIAMOND_HELMET
amount: 1
name: "&bDiamond Helmet"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 20
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
22:
material: DIAMOND_CHESTPLATE
amount: 1
name: "&bDiamond Chestplate"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 40
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
23:
material: DIAMOND_LEGGINGS
amount: 1
name: "&bDiamond Leggings"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 80
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
24:
material: DIAMOND_BOOTS
amount: 1
name: "&bDiamond Boots"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 160
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
29:
material: NETHERITE_SWORD
amount: 1
name: "&aNetherite Sword"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 20
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
30:
material: NETHERITE_HELMET
amount: 1
name: "&aNetherite Helmet"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 40
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
31:
material: NETHERITE_CHESTPLATE
amount: 1
name: "&aNetherite Chestplate"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 80
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
32:
material: NETHERITE_LEGGINGS
amount: 1
name: "&aNetherite Leggings"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 160
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
33:
material: NETHERITE_BOOTS
amount: 1
name: "&aNetherite Boots"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 320
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
page1:
items:
11:
material: GOLDEN_SWORD
amount: 1
name: "&eGold Sword"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- DAMAGE_ALL:4
tokenCost: 5
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
12:
material: GOLDEN_HELMET
amount: 1
name: "&eGold Helmet"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 10
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
13:
material: GOLDEN_CHESTPLATE
amount: 1
name: "&eGold Chestplate"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 20
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
14:
material: GOLDEN_LEGGINGS
amount: 1
name: "&eGold Leggings"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 40
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
15:
material: GOLDEN_BOOTS
amount: 1
name: "&eGold Boots"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 80
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
20:
material: DIAMOND_SWORD
amount: 1
name: "&bDiamond Sword"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- DAMAGE_ALL:4
tokenCost: 10
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
21:
material: DIAMOND_HELMET
amount: 1
name: "&bDiamond Helmet"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 20
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
22:
material: DIAMOND_CHESTPLATE
amount: 1
name: "&bDiamond Chestplate"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 40
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
23:
material: DIAMOND_LEGGINGS
amount: 1
name: "&bDiamond Leggings"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 80
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
24:
material: DIAMOND_BOOTS
amount: 1
name: "&bDiamond Boots"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 160
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
29:
material: NETHERITE_SWORD
amount: 1
name: "&aNetherite Sword"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- DAMAGE_ALL:4
tokenCost: 20
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
30:
material: NETHERITE_HELMET
amount: 1
name: "&aNetherite Helmet"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 40
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
31:
material: NETHERITE_CHESTPLATE
amount: 1
name: "&aNetherite Chestplate"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 80
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
32:
material: NETHERITE_LEGGINGS
amount: 1
name: "&aNetherite Leggings"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 160
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
33:
material: NETHERITE_BOOTS
amount: 1
name: "&aNetherite Boots"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 320
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
page2:
items:
11:
material: GOLDEN_SWORD
amount: 1
name: "&eGold Sword"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- DAMAGE_ALL:4
tokenCost: 5
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
12:
material: GOLDEN_HELMET
amount: 1
name: "&eGold Helmet"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 10
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
13:
material: GOLDEN_CHESTPLATE
amount: 1
name: "&eGold Chestplate"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 20
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
14:
material: GOLDEN_LEGGINGS
amount: 1
name: "&eGold Leggings"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 40
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
15:
material: GOLDEN_BOOTS
amount: 1
name: "&eGold Boots"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 80
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
20:
material: DIAMOND_SWORD
amount: 1
name: "&bDiamond Sword"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- DAMAGE_ALL:4
tokenCost: 10
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
21:
material: DIAMOND_HELMET
amount: 1
name: "&bDiamond Helmet"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 20
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
22:
material: DIAMOND_CHESTPLATE
amount: 1
name: "&bDiamond Chestplate"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 40
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
23:
material: DIAMOND_LEGGINGS
amount: 1
name: "&bDiamond Leggings"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 80
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
24:
material: DIAMOND_BOOTS
amount: 1
name: "&bDiamond Boots"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 160
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
29:
material: NETHERITE_SWORD
amount: 1
name: "&aNetherite Sword"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- DAMAGE_ALL:4
tokenCost: 20
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
30:
material: NETHERITE_HELMET
amount: 1
name: "&aNetherite Helmet"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 40
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
31:
material: NETHERITE_CHESTPLATE
amount: 1
name: "&aNetherite Chestplate"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 80
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
32:
material: NETHERITE_LEGGINGS
amount: 1
name: "&aNetherite Leggings"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 160
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
33:
material: NETHERITE_BOOTS
amount: 1
name: "&aNetherite Boots"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
- PROTECTION_ENVIRONMENTAL:2
tokenCost: 320
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"

# ---------------------------------------------------------------------------------
# - TokensPlus - Permission-Based Shop Configuration
# - You can create as many shops with any number of pages. Just follow the structure provided and add one to the last page number
# - The shop configuration section MUST BE entered in LOWERCASE LETTERS. The 'shopTitle' can be anything, color codes are supported!
# - The permission needed to use the /token shop <shopname> command will be 'tokensplus.shop.<shopname>'
# - The example below shows two shop configuration sections (example and example2).
# - Their commands/permissions would be /token shop <example || example2> / tokensplus.shop.example / tokensplus.shop.example2
# ---------------------------------------------------------------------------------
example:
shopTitle: "&4&lVIP SHOP"
page0:
items:
11:
material: GOLD_BLOCK
amount: 1
name: "&eGold block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 5
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
12:
material: GOLD_BLOCK
amount: 2
name: "&eGold block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 10
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
13:
material: GOLD_BLOCK
amount: 4
name: "&eGold block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 20
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
14:
material: GOLD_BLOCK
amount: 8
name: "&eGold block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 40
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
15:
material: GOLD_BLOCK
amount: 16
name: "&eGold block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 80
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
20:
material: DIAMOND_BLOCK
amount: 1
name: "&bDiamond block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 10
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
21:
material: DIAMOND_BLOCK
amount: 2
name: "&bDiamond block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 20
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
22:
material: DIAMOND_BLOCK
amount: 4
name: "&bDiamond block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 40
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
23:
material: DIAMOND_BLOCK
amount: 8
name: "&bDiamond block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 80
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
24:
material: DIAMOND_BLOCK
amount: 16
name: "&bDiamond block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 160
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
29:
material: EMERALD_BLOCK
amount: 1
name: "&aEmerald block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 20
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
30:
material: EMERALD_BLOCK
amount: 2
name: "&aEmerald block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 40
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
31:
material: EMERALD_BLOCK
amount: 4
name: "&aEmerald block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 80
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
32:
material: EMERALD_BLOCK
amount: 8
name: "&aEmerald block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 160
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
33:
material: EMERALD_BLOCK
amount: 16
name: "&aEmerald block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 320
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
example2:
shopTitle: "&6&lSUPER VIP SHOP"
page0:
items:
11:
material: GOLD_BLOCK
amount: 1
name: "&eGold block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 5
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
12:
material: GOLD_BLOCK
amount: 2
name: "&eGold block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 10
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
13:
material: GOLD_BLOCK
amount: 4
name: "&eGold block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 20
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
14:
material: GOLD_BLOCK
amount: 8
name: "&eGold block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 40
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
15:
material: GOLD_BLOCK
amount: 16
name: "&eGold block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 80
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
20:
material: DIAMOND_BLOCK
amount: 1
name: "&bDiamond block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 10
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
21:
material: DIAMOND_BLOCK
amount: 2
name: "&bDiamond block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 20
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
22:
material: DIAMOND_BLOCK
amount: 4
name: "&bDiamond block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 40
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
23:
material: DIAMOND_BLOCK
amount: 8
name: "&bDiamond block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 80
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
24:
material: DIAMOND_BLOCK
amount: 16
name: "&bDiamond block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 160
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
29:
material: EMERALD_BLOCK
amount: 1
name: "&aEmerald block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 20
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
30:
material: EMERALD_BLOCK
amount: 2
name: "&aEmerald block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 40
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
31:
material: EMERALD_BLOCK
amount: 4
name: "&aEmerald block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 80
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
32:
material: EMERALD_BLOCK
amount: 8
name: "&aEmerald block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 160
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"
33:
material: EMERALD_BLOCK
amount: 16
name: "&aEmerald block"
lore:
- "&7Thanks for using TokensPlus!"
enchants:
-
tokenCost: 320
shouldRemoveNameOnPurchase: true
shouldRemoveLoreOnPurchase: true
commands:
- "tell %playername% Thanks for using TokensPlus!"

Here is an updated demo GIF of the TokensPlus in action, using this improved shops.yml file:
[​IMG]
----------, Mar 25, 2021

NOTE: This is a major breaking change! With this version, the plugin will no longer pull the default TokensPlus shop from the config.yml. You will have to update the 'tokensplus' section in shops.yml to configure the default TokensPlus shop going forward.

I would recommend re-creating your current configuration in shops.yml before removing the 'shop' section from config.yml

With this version of TokensPlus, I've added the ability to create additional shops that players can access using /token shop <shopname>. These shops are permission protected, meaning the player will need the " tokensplus.shop.<shopname>" permission to be able to open the specified shop.

Additionally, I resolved an issue that was preventing new players from have their initial token balances establishd when using the flat-file (tokens.yml) approach.

In order to add this Permission-based shops feature, it required me to refactor the structure of how I defined shops previously. Going forward, the default TokensPlus shop (/token shop) and any permission-based shops added, will be defined in a new YAML file ( shops.yml). Furthermore, I removed the 'shop' section from the config.yml and added additional messaging in messages.yml

Here are the latest versions of these three YAML files:
Code (YAML):
## TokensPlus - Configuration
config
:
  # If enabled, player token balance will be managed through a MySQL database instead of the tokens.yml flat file
  # I highly recommend restarting the server when switching between MySQL and flat file mode.
  MySQL
:
    enabled
: false
    host
: "localhost"
    port
: "3306"
    database
: "tokensplus"
    username
: "root"
    password
: ""
    useSSL
: false

  # This defines what the default starting amount of tokens the player will receive
  defaultTokenAmount
: 0

  # If enabled, the TokensPlus shop inventory will close on purchase
  shouldCloseShopOnPurchase
: true

  # If enabled, checks to see if you are using the latest version of TokensPlus
  checkForUpdates
: true

Code (YAML):
## TokensPlus - Messages
messages
:
  prefix
: "&8[&6TokensPlus&8]"
  reloadPlugin
: "%prefix% &aYou successfully reloaded the plugin!"
  shopDoesNotExist
: "%prefix% &c%name% is not a valid shop name!"
  doesNotHaveShopPermission
: "%prefix% &cYou do not have permission to open %name% shop!"
  addTokens
: "%prefix% &aYou received %amount% tokens!"
  removeTokens
: "%prefix% &cYou lost %amount% tokens!"
  setTokens
: "%prefix% &aYour token balance was set to %amount% tokens!"
  notEnoughTokens
: "%prefix% &cYou do not have enough tokens to give that amount!"
  playerDoesNotExist
: "%prefix% &cThat player does not exist!"
  giveTokens
: "%prefix% &aYou gave %amount% tokens to %player%!"
  receivedTokens
: "%prefix% &aYou received %amount% tokens from %player%!"
  tokenAmountNotAnInteger
: "%prefix% &cToken amount entered is not a valid integer!"
  inventoryFull
: "%prefix% &cYour inventory is full!"
  cannotAfford
: "%prefix% &cYou cannot afford %name% &c!"
  purchaseItem
: "%prefix% &aYou purchased %name% &afor %amount% tokens!"
  playerBalance
: "%prefix% &a%name% has %amount% tokens!"

Code (YAML):
## TokensPlus - Shops
shop
:

  # ---------------------------------------------------------------------------------
  # - TokensPlus - Default Shop Configuration
  # - Players will see this shop when they use the /token shop command.
  # - DO NOT MODIFY THE SECTION NAME (TOKENSPLUS) OR REMOVE THE SECTION. OTHERWISE, THE MAIN /TOKEN SHOP COMMAND WILL THROW ERRORS!
  # ---------------------------------------------------------------------------------
  # You can create any number of shop pages. Just follow the structure provided and add one to the last page number
  # For example, if you wanted to add another page to the default config.yml, you would add a page3 section.
  # The numbers after the 'items' section refers to the slot number in the TokensPlus shop inventory.
  # All slot numbers are available, starting from 0, with the exception of slots 48, 49 and 50 (0-47, 51-53).
  # For 'material', refer here for the material names: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
  # For 'enchants', refer here for the enchantment names: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/enchantments/Enchantment.html
  tokensplus
:
    page0
:
      items
:
        21
:
          material
: DIRT
          amount
: 64
          name
: "&664 Dirt blocks"
          lore
:
           - "&7Build a dirt house!"
          enchants
:
           -
          tokenCost
: 10
          shouldRemoveNameOnPurchase
: true
          shouldRemoveLoreOnPurchase
: true
          commands
:
           - "experience add %playername% 100"
            - "tell %playername% You got 100xp for free!"
        22
:
          material
: COBBLESTONE
          amount
: 16
          name
: "&716 Cobblestone blocks"
          lore
:
           -
          enchants
:
           -
          tokenCost
: 20
          shouldRemoveNameOnPurchase
: true
          shouldRemoveLoreOnPurchase
: true
          commands
:
           - "experience add %playername% 200"
        23
:
          material
: SAND
          amount
: 8
          name
: "&d8 Sand blocks"
          lore
:
           - "&8Build a TNT sand cannon"
            - "&d&lBuild a sand castle"
          tokenCost
: 40
          shouldRemoveNameOnPurchase
: true
          shouldRemoveLoreOnPurchase
: true
          commands
:
           -
        30
:
          material
: CREEPER_SPAWN_EGG
          amount
: 4
          name
: "&a4 Creeper Spawn Eggs"
          lore
:
           - "&cSpawn creepers anywhere!"
          enchants
:
           -
          tokenCost
: 10
          shouldRemoveNameOnPurchase
: true
          shouldRemoveLoreOnPurchase
: false
          commands
:
           -
        31
:
          material
: EXPERIENCE_BOTTLE
          amount
: 16
          name
: "&416 XP Bottles"
          lore
:
           - "&7Click to buy!"
          enchants
:
           -
          tokenCost
: 10
          shouldRemoveNameOnPurchase
: true
          shouldRemoveLoreOnPurchase
: true
          commands
:
           -
        32
:
          material
: TNT
          amount
: 64
          name
: "&264 TNT"
          lore
:
           -
          enchants
:
           -
          tokenCost
: 10
          shouldRemoveNameOnPurchase
: true
          shouldRemoveLoreOnPurchase
: true
          commands
:
           -
    page1
:
      items
:
        21
:
          material
: DIAMOND
          amount
: 64
          name
: "&b64 Diamonds"
          lore
:
           - "&7Click to buy!"
          enchants
:
           -
          tokenCost
: 10
          shouldRemoveNameOnPurchase
: true
          shouldRemoveLoreOnPurchase
: true
          commands
:
           -
    page2
:
      items
:
        21
:
          material
: DIAMOND_SWORD
          amount
: 1
          name
: "&a&lDIAMOND SWORD!!!"
          lore
:
           - "&7Click to buy!"
          enchants
:
           - DAMAGE_ALL:4
          tokenCost
: 10
          shouldRemoveNameOnPurchase
: true
          shouldRemoveLoreOnPurchase
: false
          commands
:
           -

  # ---------------------------------------------------------------------------------
  # - TokensPlus - Permission-Based Shop Configuration
  # - You can create as many shops with any number of pages. Just follow the structure provided and add one to the last page number
  # - The shop configuration section MUST BE entered in LOWERCASE LETTERS. The 'shopTitle' can be anything, color codes are supported!
  # - The permission needed to use the /token shop <shopname> command will be 'tokensplus.shop.<shopname>'
  # - The example below shows two shop configuration sections (example and example2).
  # - Their commands/permissions would be /token shop <example || example2> / tokensplus.shop.example / tokensplus.shop.example2
  # ---------------------------------------------------------------------------------
  example
:
    shopTitle
: "&4&lVIP SHOP"
    page0
:
      items
:
        22
:
          material
: DIRT
          amount
: 64
          name
: "&664 Dirt blocks"
          lore
:
           - "&7Build a dirt house!"
          enchants
:
           -
          tokenCost
: 10
          shouldRemoveNameOnPurchase
: true
          shouldRemoveLoreOnPurchase
: true
          commands
:
           - "experience add %playername% 100"
            - "tell %playername% You got 100xp for free!"
    page1
:
      items
:
        31
:
          material
: GOLDEN_APPLE
          amount
: 16
          name
: "&b16 Golden Apples"
          lore
:
           -
          tokenCost
: 50
          shouldRemoveNameOnPurchase
: true
          shouldRemoveLoreOnPurchase
: true
          commands
:
           -
  example2
:
    shopTitle
: "&6&lSUPER VIP SHOP"
    page0
:
      items
:
        22
:
          material
: ENCHANTED_GOLDEN_APPLE
          amount
: 64
          name
: "&664 Golden Apples"
          lore
:
           -
          enchants
:
           -
          tokenCost
: 50
          shouldRemoveNameOnPurchase
: true
          shouldRemoveLoreOnPurchase
: true
          commands
:
           -

----------, Mar 25, 2021

Thanks to @dinoboss2001 for the suggestion!

With this update, I've added a new command /token give. This command will allow players to give each other tokens. In addition to this command, I've added some extra messaging related to this new command.

[​IMG]

Here is the latest messages.yml
Code (YAML):
## TokensPlus - Messages
messages
:
  prefix
: "&8[&6TokensPlus&8]"
  reloadPlugin
: "%prefix% &aYou successfully reloaded the plugin!"
  addTokens
: "%prefix% &aYou received %amount% tokens!"
  removeTokens
: "%prefix% &cYou lost %amount% tokens!"
  setTokens
: "%prefix% &aYour token balance was set to %amount% tokens!"
  notEnoughTokens
: "%prefix% &cYou do not have enough tokens to give that amount!"
  playerDoesNotExist
: "%prefix% &cThat player does not exist!"
  giveTokens
: "%prefix% &aYou gave %amount% tokens to %player%!"
  receivedTokens
: "%prefix% &aYou received %amount% tokens from %player%!"
  tokenAmountNotAnInteger
: "%prefix% &cToken amount entered is not a valid integer!"
  inventoryFull
: "%prefix% &cYour inventory is full!"
  cannotAfford
: "%prefix% &cYou cannot afford %name% &c!"
  purchaseItem
: "%prefix% &aYou purchased %name% &afor %amount% tokens!"
  playerBalance
: "%prefix% &a%name% has %amount% tokens!"
----------, Mar 25, 2021

Found a handful of bugs when attempting to use commands involving or direct towards player(s) that were not currently logged in on the server.
----------, Mar 24, 2021

With this update, I have added Placeholder API support. As more placeholders are requested, I will update this list. But for now, I've added this placeholder:
  • %tokensplus_tokens% - Gives the player's token balance
I'll be working on getting the documentation updated on Placeholder API to list TokensPlus and it's placeholders today.
----------, Mar 24, 2021

Added new configuration option 'checkForUpdates' to the config.yml. If enabled, the plugin will notify you when an update has been made to TokensPlus.

Here is the latest config.yml:
Code (YAML):
## TokensPlus - Configuration
config
:
  # If enabled, player token balance will be managed through a MySQL database instead of the tokens.yml flat file
  # I highly recommend restarting the server when switching between MySQL and flat file mode.
  MySQL
:
    enabled
: false
    host
: "localhost"
    port
: "3306"
    database
: "tokensplus"
    username
: "root"
    password
: ""
    useSSL
: false

  # This defines what the default starting amount of tokens the player will receive
  defaultTokenAmount
: 0

  # If enabled, the TokensPlus shop inventory will close on purchase
  shouldCloseShopOnPurchase
: true

  # If enabled, checks to see if you are using the latest version of TokensPlus
  checkForUpdates
: true

## TokensPlus - Shop Configuration
  # You can create any number of shop pages. Just follow the structure provided and add one to the last page number
  # For example, if you wanted to add another page to the default config.yml, you would add a page3 section.
  # The numbers after the 'items' section refers to the slot number in the TokensPlus shop inventory.
  # All slot numbers are available, starting from 0, with the exception of slots 48, 49 and 50 (0-47, 51-53).
  # For 'material', refer here for the material names: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
  # For 'enchants', refer here for the enchantment names: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/enchantments/Enchantment.html
shop
:
  page0
:
    items
:
      21
:
        material
: DIRT
        amount
: 64
        name
: "&664 Dirt blocks"
        lore
:
         - "&7Build a dirt house!"
        enchants
:
         -
        tokenCost
: 10
        shouldRemoveNameOnPurchase
: true
        shouldRemoveLoreOnPurchase
: true
        commands
:
         - "experience add %playername% 100"
          - "tell %playername% You got 100xp for free!"
      22
:
        material
: COBBLESTONE
        amount
: 16
        name
: "&716 Cobblestone blocks"
        lore
:
         -
        enchants
:
         -
        tokenCost
: 20
        shouldRemoveNameOnPurchase
: true
        shouldRemoveLoreOnPurchase
: true
        commands
:
         - "experience add %playername% 200"
      23
:
        material
: SAND
        amount
: 8
        name
: "&d8 Sand blocks"
        lore
:
         - "&8Build a TNT sand cannon"
          - "&d&lBuild a sand castle"
        tokenCost
: 40
        shouldRemoveNameOnPurchase
: true
        shouldRemoveLoreOnPurchase
: true
        commands
:
         -
      30
:
        material
: CREEPER_SPAWN_EGG
        amount
: 4
        name
: "&a4 Creeper Spawn Eggs"
        lore
:
         - "&cSpawn creepers anywhere!"
        enchants
:
         -
        tokenCost
: 10
        shouldRemoveNameOnPurchase
: true
        shouldRemoveLoreOnPurchase
: false
        commands
:
         -
      31
:
        material
: EXPERIENCE_BOTTLE
        amount
: 16
        name
: "&416 XP Bottles"
        lore
:
         - "&7Click to buy!"
        enchants
:
         -
        tokenCost
: 10
        shouldRemoveNameOnPurchase
: true
        shouldRemoveLoreOnPurchase
: true
        commands
:
         -
      32
:
        material
: TNT
        amount
: 64
        name
: "&264 TNT"
        lore
:
         -
        enchants
:
         -
        tokenCost
: 10
        shouldRemoveNameOnPurchase
: true
        shouldRemoveLoreOnPurchase
: true
        commands
:
         -
  page1
:
    items
:
      21
:
        material
: DIAMOND
        amount
: 64
        name
: "&b64 Diamonds"
        lore
:
         - "&7Click to buy!"
        enchants
:
         -
        tokenCost
: 10
        shouldRemoveNameOnPurchase
: true
        shouldRemoveLoreOnPurchase
: true
        commands
:
         -
  page2
:
    items
:
      21
:
        material
: DIAMOND_SWORD
        amount
: 1
        name
: "&a&lDIAMOND SWORD!!!"
        lore
:
         - "&7Click to buy!"
        enchants
:
         - DAMAGE_ALL:4
        tokenCost
: 10
        shouldRemoveNameOnPurchase
: true
        shouldRemoveLoreOnPurchase
: false
        commands
:
         -
----------, Mar 24, 2021

Added a permission based token multiplier to mob drops:
  • tokensplus.dropsmultiplier.<number>
If the player has this permission, the amount of tokens that they receive from killing a mob (if that mob is enabled) will be multiplied by <number>. For example, if a player has the permission tokensplus.dropsmultiplier.5, then they would receive 5x the amount of tokens.

Added a tokenMultiplierMaxValue configuration option in the drops.yml to set what the maximum permission based multiplier value can be.

Here is the latest drops.yml
Code (YAML):
## TokensPlus - Drops
# Drop Chance is set as 1/dropChance.
# Meaning, if dropChance = 1, the drop chance will be 100%.
# If you wanted the drop chance to be 20%, then dropChance should be set as 5 (1/5).
drops
:
  # If enabled, the player will receive a message when the tokens are added to their balance from a mob drop
  shouldMessageOnDrop
: true

  # Defines the maximum value for the token drop multiplier
  # If a player has a permission that is higher than this value, their multiplier will be this value.
  # For example, player has tokensplus.dropsmultiplier.200, their multiplier will be x100.
  tokenMultiplierMaxValue
: 100

  # Passive mobs
  BAT
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  CAT
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  CHICKEN
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  COD
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  COW
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  DONKEY
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  FOX
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  HORSE
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  MOOSHROOM
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  MULE
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  OCELOT
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  PARROT
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  PIG
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  PIGLIN
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  POLAR_BEAR
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  PUFFERFISH
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  RABBIT
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  SALMON
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  SHEEP
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  SKELETON_HORSE
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  SNOW_GOLEM
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  SQUID
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  STRIDER
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  TROPICAL_FISH
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  TURTLE
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  VILLAGER
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  WANDERING_TRADER
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10

  # Neutral mobs
  BEE
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  CAVE_SPIDER
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  DOLPHIN
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  ENDERMAN
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  IRON_GOLEM
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  LLAMA
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  PANDA
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  SPIDER
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  WOLF
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  ZOMBIFIED_PIGLIN
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10

  # Hostile mobs
  BLAZE
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  CHICKEN_JOCKEY
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  CREEPER
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  DROWNED
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  ELDER_GUARDIAN
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  ENDERMITE
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  EVOKER
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  GHAST
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  GUARDIAN
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  HOGLIN
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  HUSK
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  MAGMA_CUBE
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  PHANTOM
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  PIGLIN_BRUTE
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  PILLAGER
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  RAVAGER
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  RAVAGER_JOCKEY
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  SHULKER
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  SILVERFISH
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  SKELETON
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  SKELETON_HORSEMAN
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  SLIME
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  SPIDER_JOCKEY
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  STRAY
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  VEX
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  VINDICATOR
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  WITCH
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  WITHER_SKELETON
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  ZOGLIN
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  ZOMBIE
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  ZOMBIE_VILLAGER
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10

  # Boss mobs
  ENDER_DRAGON
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  WITHER
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10

  # Non-Naturally Spawning mobs
  GIANT
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  ZOMBIE_HORSE
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
  ILLUSIONER
:
    enabled
: false
    dropChance
: 1
    tokensDropped
: 10
----------, Mar 24, 2021

Thanks to @dinoboss2001 for the suggestion!

Updated the TokensPlus shop configuration to have a 'commands' section for each item defined. This list of commands will be dispatched when the player purchases the corresponding item.

Here is the latest config.yml after this update
Code (YAML):
## TokensPlus - Configuration
config
:
  # If enabled, player token balance will be managed through a MySQL database instead of the tokens.yml flat file
  # I highly recommend restarting the server when switching between MySQL and flat file mode.
  MySQL
:
    enabled
: false
    host
: "localhost"
    port
: "3306"
    database
: "tokensplus"
    username
: "root"
    password
: ""
    useSSL
: false

  # This defines what the default starting amount of tokens the player will receive
  defaultTokenAmount
: 0

  # If enabled, the TokensPlus shop inventory will close on purchase
  shouldCloseShopOnPurchase
: true

## TokensPlus - Shop Configuration
  # You can create any number of shop pages. Just follow the structure provided and add one to the last page number
  # For example, if you wanted to add another page to the default config.yml, you would add a page3 section.
  # The numbers after the 'items' section refers to the slot number in the TokensPlus shop inventory.
  # All slot numbers are available, starting from 0, with the exception of slots 48, 49 and 50 (0-47, 51-53).
  # For 'material', refer here for the material names: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
  # For 'enchants', refer here for the enchantment names: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/enchantments/Enchantment.html
shop
:
  page0
:
    items
:
      21
:
        material
: DIRT
        amount
: 64
        name
: "&664 Dirt blocks"
        lore
:
         - "&7Build a dirt house!"
        enchants
:
         -
        tokenCost
: 10
        shouldRemoveNameOnPurchase
: true
        shouldRemoveLoreOnPurchase
: true
        commands
:
         - "experience add %playername% 100"
          - "tell %playername% You got 100xp for free!"
      22
:
        material
: COBBLESTONE
        amount
: 16
        name
: "&716 Cobblestone blocks"
        lore
:
         -
        enchants
:
         -
        tokenCost
: 20
        shouldRemoveNameOnPurchase
: true
        shouldRemoveLoreOnPurchase
: true
        commands
:
         - "experience add %playername% 200"
      23
:
        material
: SAND
        amount
: 8
        name
: "&d8 Sand blocks"
        lore
:
         - "&8Build a TNT sand cannon"
          - "&d&lBuild a sand castle"
        tokenCost
: 40
        shouldRemoveNameOnPurchase
: true
        shouldRemoveLoreOnPurchase
: true
        commands
:
         -
      30
:
        material
: CREEPER_SPAWN_EGG
        amount
: 4
        name
: "&a4 Creeper Spawn Eggs"
        lore
:
         - "&cSpawn creepers anywhere!"
        enchants
:
         -
        tokenCost
: 10
        shouldRemoveNameOnPurchase
: true
        shouldRemoveLoreOnPurchase
: false
        commands
:
         -
      31
:
        material
: EXPERIENCE_BOTTLE
        amount
: 16
        name
: "&416 XP Bottles"
        lore
:
         - "&7Click to buy!"
        enchants
:
         -
        tokenCost
: 10
        shouldRemoveNameOnPurchase
: true
        shouldRemoveLoreOnPurchase
: true
        commands
:
         -
      32
:
        material
: TNT
        amount
: 64
        name
: "&264 TNT"
        lore
:
         -
        enchants
:
         -
        tokenCost
: 10
        shouldRemoveNameOnPurchase
: true
        shouldRemoveLoreOnPurchase
: true
        commands
:
         -
  page1
:
    items
:
      21
:
        material
: DIAMOND
        amount
: 64
        name
: "&b64 Diamonds"
        lore
:
         - "&7Click to buy!"
        enchants
:
         -
        tokenCost
: 10
        shouldRemoveNameOnPurchase
: true
        shouldRemoveLoreOnPurchase
: true
        commands
:
         -
  page2
:
    items
:
      21
:
        material
: DIAMOND_SWORD
        amount
: 1
        name
: "&a&lDIAMOND SWORD!!!"
        lore
:
         - "&7Click to buy!"
        enchants
:
         - DAMAGE_ALL:4
        tokenCost
: 10
        shouldRemoveNameOnPurchase
: true
        shouldRemoveLoreOnPurchase
: false
        commands
:
         -
----------, Mar 24, 2021

Resource Information
Author:
----------
Total Downloads: 1,468
First Release: Mar 23, 2021
Last Update: Dec 31, 2021
Category: ---------------
All-Time Rating:
7 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings