Economy and Fees - MyWarp/MyWarp GitHub Wiki

If you use a supported economy plugin, you can charge players a fee for using MyWarp's commands.

Understanding Fees

Fees define how much a player must pay for that feature. A fee consists of several values:

  • The create fee is charged when a public warp is created.
  • The create-private fee is charged when a private warp is created.
  • The delete fee is charged when a warp is deleted.
  • The give fee is charged when a warp is given to another user.
  • The help fee is charged when the build-in help is used.
  • The invite fee is charged when a player or group is invited to a warp.
  • The list fee is charged when warps are listed.
  • The point fee is charged when a user points her compass to a warp.
  • The private fee is charged when a warp is privatized.
  • The public fee is charged when a warp is publicised.
  • The uninvite fee is charged when a player or group is uninvited from a warp.
  • The update fee is charged when a warp's location is updated.
  • The warp-player fee is charged when a player is teleported to a warp by another player.
  • The warp-sign-create fee is charged when a warp sign is created.
  • The warp-sign-use fee is charged when a warp sign is used.
  • The warp-to fee is charged when a warp is used.
  • The welcome fee is charged when a warp's welcome message is changed.

Configuration

General setup

Economy support needs to enabled in the configuration file:

Configuration Node Effect
economy.enabled  Controls whether economy support is enabled.
economy.informAfterTransaction  If enabled, the user is notified after a transaction takes place.

On Bukkit

On Bukkit, Vault is used to connect MyWarp to the economy implementation. If Vault is not installed, MyWarp will automatically disable its economy support.

Fees are defined in the configuration file and then set via permission. There is a default fee that applies for anybody who does not have a more specific fee.

Here is an example with one configured set of fees:

economy:
  enabled: true
  informAfterTransaction: true
  defaultFee:
    assets: 0
    create: 25
    createPrivate: 25
    delete: 25
    give: 25
    help: 0
    info: 0
    invite: 25
    list: 0
    point: 25
    private: 25
    public: 25
    uninvite: 25
    update: 25
    warpPlayer: 25
    warpSignCreate: 25
    warpSignUse: 10
    warpTo: 10
    welcome: 25
  configuredFees:
    vip:
      create: 10
      createPrivate: 10
      warpSignCreate: 10
  • Users under the default limit are charged 10 points for using warps and warp signs, but can use the info, help, list and assets commands for free. Anything else costs them 25 points.
  • Users with the vip limit will be charged for creating warps and warp signs. Note that all other entries are omitted, witch automatically sets them to 0 - so any other action is free.

To assign a configured set of fees to a player, she must have the corresponding mywarp.economy.[FEENAME] permission. So, for example, to have the fees defined under vip above, the player must have the mywarp.economy.vip permission.

Attention: Permissions are case-sensitive.

Fee permissions are resolved in lexicographical order (alphabetical order). If a player happens to have permission for two fees, the lexicographical first applies. This means that you cannot name the fee-sets like you want to, but must name them in a way that takes the lexicographical ordering into account.

Disobey permissions

Fees can be disobeyed via permissions:

Permission Effect
mywarp.economy.disobey No fees apply