Denizen Script Meta Documentation Search


Learn about how Denizen works in The Beginner's Guide.
Showing 11 search results for economy out of 3928 meta-documentation entries...

Partial Name Match Results



Language


NameEconomy Script Containers
DescriptionEconomy script containers

Economy script containers provide a Vault economy, which can be used in scripts by
Tag:PlayerTag.money and Command:money
and as well by any other plugin that relies on economy functionality (such as shop plugins).

Note that vault economy bank systems are not currently supported.
Per-world economies are also not currently supported.

Note that in most cases, you do not want to have multiple economy providers, as only one will actually be in use.

ALL SCRIPT KEYS ARE REQUIRED.

Economy scripts can be automatically disabled by adding "enabled: false" as a root key (supports any load-time-parseable tags).


# The script name will be shown to the economy provider as the name of the economy system.
Economy_Script_Name:

    type: economy

    # The Bukkit service priority. Priorities are Lowest, Low, Normal, High, Highest.
    priority: normal
    # The name of the currency in the singular (such as "dollar" or "euro").
    name single: scripto
    # The name of the currency in the plural (such as "dollars" or "euros").
    name plural: scriptos
    # How many digits after the decimal to include. For example, '2' means '1.05' is a valid amount, but '1.005' will be rounded.
    digits: 2
    # Format the standard output for the money in human-readable format. Use "<[amount]>" for the actual amount to display.
    # Fully supports tags.
    format: $<[amount]>
    # A tag that returns the balance of a linked player. Use a 'proc[]' tag if you need more complex logic.
    # Must return a decimal number.
    balance: <player.flag[money]>
    # A tag that returns a boolean indicating whether the linked player has the amount specified by def "<[amount]>".
    # Use a 'proc[]' tag if you need more complex logic.
    # Must return 'true' or 'false'.
    has: <player.flag[money].is[or_more].than[<[amount]>]>
    # A script that removes the amount of money needed from a player.
    # Note that it's generally up to the systems calling this script to verify that the amount can be safely withdrawn, not this script itself.
    # However you may wish to verify that the player has the amount required within this script.
    # The script may determine a failure message if the withdraw was refused. Determine nothing for no error.
    # Use def 'amount' for the amount to withdraw.
    withdraw:
    - flag <player> money:-:<[amount]>
    # A script that adds the amount of money needed to a player.
    # The script may determine a failure message if the deposit was refused. Determine nothing for no error.
    # Use def 'amount' for the amount to deposit.
    deposit:
    - flag <player> money:+:<[amount]>

GroupScript Container System
RequiresVault
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/EconomyScriptContainer.java#L34

Tag


Name<server.economy.currency_name[<#.#>]>
ReturnsElementTag
DescriptionReturns the server's economy currency name (automatically singular or plural based on input value).
RequiresVault
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L126
Name<server.economy.currency_plural>
ReturnsElementTag
DescriptionReturns the server's economy currency name (in the plural form, like "Dollars").
RequiresVault
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L138
Name<server.economy.currency_singular>
ReturnsElementTag
DescriptionReturns the server's economy currency name (in the singular form, like "Dollar").
RequiresVault
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L150
Name<server.economy.format[<#.#>]>
ReturnsElementTag
DescriptionReturns the amount of money, formatted according to the server's economy.
RequiresVault
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L114
Name<server.has_economy>
ReturnsElementTag(Boolean)
DescriptionReturns whether the server has a known economy plugin loaded.
RequiresVault
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java#L1102

Semi-Strong Match Results



Event


Nameessentials player balance changes
Event Lines essentials player balance changes
Triggerswhen a player's balance changes, when using Essentials economy.
Generated Examplesafter essentials player balance changes:
Has PlayerAlways. - this adds switches 'flagged:<flag name>' + 'permission:<node>', in addition to the '<player>' link.
Contexts<context.old_balance> Returns the balance before changes are made.
<context.new_balance> Returns the balance after changes are made.
<context.cause> returns the reason for the balance change, refer to 🔗https://github.com/EssentialsX/Essentials/blob/2.x/Essentials/src/main/java/net/ess3/api/events/UserBalanceUpdateEvent.java#L73-L78.
Has LocationTrue - This adds the switches 'in:<area>', 'location_flagged:<flag>', ...
GroupDepenizen
RequiresDepenizen, Essentials
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/events/essentials/PlayerBalanceChangeScriptEvent.java#L14

Semi-Decent Match Results



Command


NameMoney
Syntaxmoney [give/take/set] (quantity:<#.#>) (players:<player>|...)
Short DescriptionManage a player's money.
Full DescriptionGive money to, take money from, and set the balance of a player.
If no quantity is specified it defaults to '1'.
You can specify a list of players to give to or take from. If no player(s) are specified, defaults to the attached player.
NOTE: This requires an economy plugin or script, and Vault. May work for offline players depending on economy plugin.
Related Tags<PlayerTag.money> Returns the amount of money the player has with the registered Economy system. (...)
Usage Example
# Use to give 1 money to the player.
- money give
Usage Example
# Use to take 10 money from a player.
- money take quantity:10 players:<[player]>
Usage Example
# Use to give all players on the server 100 money.
- money give quantity:100 players:<server.players>
Usage Example
# Use to set the money of all online players to 250.
- money set quantity:250 players:<server.online_players>
Groupplayer
RequiresVault
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/MoneyCommand.java#L28
Nameplayerpoints
Syntaxplayerpoints [set/give/take] [<#>]
Short DescriptionAdjusts the amount of points the player has.
Full DescriptionTake, give or set the amount of points a player has.
This is useful for plugins supporting this kind of economy
which uses the points instead of money as an alternative system.
This works for offline players.
Related Tags<PlayerTag.playerpoints_points> Returns the amount of points the player has. Only works on online players.
Usage Example
# Use to give 5 points to the player.
- playerpoints give 5
Usage Example
# Use to set 10 points to the player.
- playerpoints set 10
GroupDepenizen
RequiresDepenizen, PlayerPoints
Sourcehttps://github.com/DenizenScript/Depenizen/blob/master/src/main/java/com/denizenscript/depenizen/bukkit/commands/playerpoints/PlayerPointsCommand.java#L22

Tag


Name<PlayerTag.formatted_money>
ReturnsElementTag
DescriptionReturns the formatted form of the player's money balance in the registered Economy system.
Generated Example
- narrate <player.formatted_money>
RequiresVault
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L719
Name<PlayerTag.money>
ReturnsElementTag(Decimal)
DescriptionReturns the amount of money the player has with the registered Economy system.
May work offline depending on economy provider.
Generated Example
- narrate "the decimal value is <player.money>"
RequiresVault
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/objects/PlayerTag.java#L736