Home›Java›Mods›PremiumCurrency
PremiumCurrency
ModsJava

PremiumCurrency

Java mod listed for Minecraft 1.16. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot
Description
PremiumCurrency allows you to implement a type of currency that can be purchased or earned in-game, similar to gems in many free-to-play mobile games. This allows players to not be frustrated by paid perks you may offer, since with enough playtime, they too will be able to earn them.

Config

The configuration options provided in PremiumCurrency are powerful, allowing you to customize your system to your hearts content. If there are any features that you feel are missing, let me know and I may be able to add them.

Code (YAML):
# Premium Currency Config File
#
# Placeholders:
# - %category%: Category Name (Works in defaults.*, packages.*)
# - %package%: Package Name (Works in defaults.*, packages.*)
# - %amount%: Amount (Works in defaults.*, packages.*)
# - %premPrice%: Premium Currency Package Price (Works in defaults.*, packages.*)
# - %regPrice%: Regular Currency Pacakge Price (Works in defaults.*, packages.*)
# - %playerDisplay%: Player's Displayname (Works in store.*)
# - %playerName%: Player's Username (Works in store.*)
# - %bonusPercent%: The percent amount of extra items you recieve compared to the first package (Works in defaults.*, packages.*)
# - %beforeBonus%: The amount of items you would receive if everything scaled linearly based on the first package's price (Works in defaults.*, packages.*)
# - %timesPurchased%: The number of times the player has purchased the package (Works in default.*, packages.*)
#
# Functions: (Currently, you cannot nest functions, but that may change in the future)
# - formatCurrency(input): Formats the argument as if it was a currency. It must be an integer to work correctly\
# - input(InsertInputName): Whatever the player inputted for the prompt if the particular package asks for an input (Works in default-on-success, on-success)
# - if(condition, ifTrue, [ifFalse]): Returns the string ifTrue if 'condition' is true, otherwise, it returns ifFalse
#                                   (if ifFalse is provided, otherwise it returns blank).
#                                   'condition' must be the name of an input of type BOOLEAN. Do not use the input() function
#
# Actions: (Only works in on-success and default-on-success, works with placeholders and functions)
# - [MESSAGE]: Sends a message to the player with the shop open (E.G. [MESSAGE]Congrats on your purchase)
# - [COMMAND]: Runs a command as console (E.G. [COMMAND]eco give %player% 10000)
# - [BROADCAST]: Broadcasts a message to the entire server (E.G. [BROADCAST]Thank you to %player% for purchasing %package%)
#
# Input Types: (Only works in default-input and input)
# - SIMPLETEXT: Basic text without any color/format codes (Any added by the player will be stripped)
#   * max-length (int): Set the maximum length of characters allowed, after color codes are stripped. (No limit if omitted)
#   * min-length (int): Set the minimum length of characters allowed, after color codes are stripped. (0 if omitted)
# - COlORTEXT: Same as SIMPLETEXT, but any color/format codes won't be stripped.
#   * max-length (int): Set the maximum number of characters allowed. (No limit if omitted)
#   * min-length (int): Set the minimum length of characters allowed. (0 if omitted)
#   * allow-color (bool): Whether color codes are allowed (true if omitted)
#   * allow-format (bool): Whether format codes are allowed (true if omitted)
#   * allow-magic (bool): Whether &k magic code is allowed (true if omitted)
# - INTEGER: Only allowed a valid integer input
#   * max (int): Maximum integer allowed. (No limit if omitted)
#   * min (int): Minimum integer allowed. (0 if omitted)
# - PLAYERNAME: Only allows the name of a currently online player. Use SIMPLETEXT if you want to allow offline player's names
#   * No Parameters
# - FORMATCODE: Only allows valid bukkit formatting codes (&1, &2, etc.)
#   * allow-color (bool): Whether color codes are allowed (true if omitted)
#   * allow-format (bool): Whether format codes are allowed (true if omitted)
#   * allow-magic (bool): Whether &k magic code is allowed (true if omitted)
# - BOOLEAN: Only allows yes/no, true/false, Y/N, T/F
#   * No Parameters
# - CHOICE: Allows player to choose from a list of options
#   * choices (list): Options to choose from

# v DO NOT TOUCH THIS v #
config-version
: 1       #
# ^ DO NOT TOUCH THIS ^ #


store-url
: "http://www.google.com"

message-prefix
: "&c&lYourServer&r&c » "

singular-currency
: "gem"
plural-currency
: "gems"

# If true, only console can add/remove/set premium currency for a player
console-only
: true

store
:
  gui-title
: "Gem Store"
  # Gui Size in rows (min: 1, max: 6)
  gui-size
: 3
  categories
:
    money
:
      show-bonus
: true
      slot
: 13
      gui-title
: "Buy Money"
      category-gui-item
:
        material
: CHEST
        name
: "&dPurchase Money"
        lore
: [ ]
        shiny
: true
      defaults
:
        default-gui-item
:
          material
: BONE_BLOCK
          # Uses the name before the double pipes if show-bonus is disabled, or it is the first item, otherwise it uses the name after.
          name
: "Purchase formatCurrency(%package%)||Purchase &mformatCurrency(%beforeBonus%)&r formatCurrency(%package%)"
          # The price of the item gets added automatically
          # You can use double pipes here as well
          lore
:
         - "||%bonusPercent% Extra!"
          shiny
: true
        default-on-success
:
       - "[MESSAGE]Default Message"
        - "[COMMAND]eco give %playerName% %amount%"
      packages
:
        50000
:
          # If no amount is provided, it will use the package name, and if it isn't a number, it will be 0
          amount
: 50000
          premium-price
: 125
          regular-price
: 0
          # If no item is provided, or if gui-item is omitted, it uses the default-gui-item
          gui-item
: [ ]
          # Overrides default-on-success if provided
          on-success
:
         - "[MESSAGE]Congrats %playerDisplay%"
          - "[COMMAND]eco give %playerName% %amount%"
        100000
:
          premium-price
: 200
          regular-price
: 100000
          # Limit the number of times someone can purchase a package. Omit or set to 0 to disable
          limit
: 1
          gui-item
:
            material
: SUNFLOWER
            lore
:
           - "||&c%bonusPercent% Extra"
            shiny
: false
    broadcast
:
      show-bonus
: false
      slot
: 14
      category-gui-item
:
        material
: PAPER
        name
: "&dPurchase Broadcast"
        lore
: [ ]
        shiny
: true
      defaults
:
        default-input
:
          # The input name. Used in input()
          anonymous
:
            type
: BOOLEAN
            prompt
: "Would you like your message to show your name?"
          broadcast
:
              type
: SIMPLETEXT
              prompt
: "&ePlease enter your broadcast message:"
              min-length
: 5
              max-length
: 100
        default-on-success
:
       - "[BROADCAST]if(anonymous,Message From %playerDisplay%: ,)input(broadcast)"
      packages
:
        basic-broadcast
:
          premium-price
: 10
          # Permission node required to view this package. -perm to only show to this package to those without the permission
          required-perm
: "-group.vip"
          gui-item
:
            material
: PAPER
            name
: "Purchase Basic Broadcast"
        color-broadcast
:
          premium-price
: 20
          required-perm
: "group.vip"
          gui-item
:
            material
: PAPER
            name
: "Purchase Color Broadcast"
            shiny
: true
          on-success
:
         - "[BROADCAST]if(anonymous,Message From %playerDisplay%: ,)input(broadcastColor)input(broadcast)"
          input
:
            broadcastColor
:
              type
: FORMATCODE
              prompt
: "Please enter the color for your message"
              allow-magic
: false

Permissions

As with any plugin, basic permissions are offered as well as dynamic permission based on your config setup. Below is the excerpt from the plugin.yml with the basic permissions listed:
Code (YAML):
permissions:
  premiumcurrency.*
:
    description
: Gives access to all PremiumCurrency commands
    children
:
      premiumcurrency.store
: true
      premiumcurrency.help
: true
      premiumcurrency.give
: true
      premiumcurrency.set
: true
      premiumcurrency.bal
: true
      premiumcurrency.bal.others
: true
  premiumcurrency.help
:
    description
: Allows you to view plugin help
  premiumcurrency.store
:
    description
: Allows you to open store GUI
    default
: true
  premiumcurrency.store.ignorepermissions
:
    description
: Bypasses required permissions to view packages
    default
: op
  premiumcurrency.give
:
    description
: Allows you to give players the premium currency
    default
: false
  premiumcurrency.set
:
    description
: Allows you to set a player's premium currency balance
    default
: false
  premiumcurrency.bal
:
    description
: Allows you to view your own premium currency balance
    default
: true
  premiumcurrency.bal.others
:
    description
: Allows you to view other player's premium currency balance
    default
: op

Planned Features

Commands

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

PremiumCurrency is a free Minecraft Java mod. Compatible with Minecraft 1.16. Downloaded 145 times (via Spigot). Download it and open it directly in the game.

Explore more