PaidSwitch

This project is abandoned and its default file will likely not work with the most recent version of Minecraft. Whether this project is out of date or its author has marked it as abandoned, this project is no longer maintained.

PaidSwitch

Make your players pay other players for using their switches.

Download | Source

Features:

  • Supported switches: pressure plates (wood and stone), stone button, lever, detector rail.
  • Vehicle support (vehicle with passanger on pressure plate)
  • Sign-based switch setup.
  • Separate permission for each switch type.
  • Price limits
  • Config options to decide what types of switches should PaidSwitch work with.
  • Economy support: all economy plugins supported by Vault.
  • Permission support: all SuperPerms-compatible permission plugins (tell me if you want support for older permission plugins)
  • PluginReloader compatible.

This plugin REQUIRES Vault

Usage:

To make your switch paid, put a sign next to the switch, and fill it with pattern below:

Line 1: [PaidSw]
Line 2: player account / b: bank account / leave blank / none
Line 3: cost
Line 4: description (optional, shown in notifications)

If there's more than one sign next to switch, first sign found will be used (searching order: UP, NORTH, EAST, SOUTH, WEST, DOWN)

If line 2 is empty, your name will be put there automatically.
You can also specify name of other player or economy account in line 2 if you have paidswitch.create.others permission. "none" is default name for void account, it means if you put "none" in line 2, money goes to nowhere. Could be useful if your economy doesn't support accounts.

Accounts:

You should use accounts, if you don't want any player to get the money from specific switch.
If you use iConomy, you can create account by /money create <account_name> and put it on the line 2.
If you use BOSEconomy, you can create account by /econ bank create <account_name> and put it on the line 2 with "b:" prefix.
There should be NO SPACE after "b:"

Commands:
/paidswitch - display info about plugin
/paidswitch reload - reload config.yml
aliases: /paidsw, /psw

Permissions:

    paidswitch.*:
        description: Gives all PaidSwitch permissions excepting free use.
        children:
            paidswitch.use: true
            paidswitch.create: true
            paidswitch.create.others: true
            paidswitch.create.duplicate: true
            paidswitch.create.type.*:
    paidswitch.use:
        description: Allows to use PaidSwitches.
        default: true
    paidswitch.use.free:
        description: Allows to use PaidSwitches for free.
        default: false
        children:
            paidswitch.use: true
    paidswitch.create:
        description: Allows to create PaidSwitches.
        default: op
    paidswitch.create.others:
        description: Allows to create PaidSwitches for someone else.
        default: op
    paidswitch.create.duplicate:
        description: Allows to create a second sign for other players' PaidSwitches.
        default: op
    paidswitch.create.type.*:
        description: Allows to crate all types of PaidSwitches.
        default: op
        children:
            paidswitch.create.type.wood-plate: true
            paidswitch.create.type.stone-plate: true
            paidswitch.create.type.button: true
            paidswitch.create.type.lever: true
            paidswitch.create.type.detector-rail: true
    paidswitch.create.type.wood-plate:
        description: Allows to crate paid wood plate.
        default: op
    paidswitch.create.type.stone-plate:
        description: Allows to crate paid stone plate.
        default: op
    paidswitch.create.type.button:
        description: Allows to crate paid button.
        default: op
    paidswitch.create.type.lever:
        description: Allows to crate paid lever.
        default: op
    paidswitch.create.type.detector-rail:
        description: Allows to crate paid detector rail.
        default: op
    paidswitch.limit.price.none:
        description: Allows to create PaidSwitches with unlimited price.
        default: op
    paidswitch.limit.price.limit1:
        description: "Sets user's price limit to limit1 from config."
        default: false
    paidswitch.admin:
        description: Gives access to /paidswitch command.
        default: op

Configuration:

earn-for-free: false                   # should switch owner earn money, when switch user has paidswitch.use.free permission?
switch-type-permission-needed: true    # does player need paidswitch.create.type... permission for creating each type of switch?
allowed-switches:                      # enable/disable PaidSwitch for specific switch types (both creating and using, if you disable a type, paidswitches of this type created before will become free of charge)
  wood-plate: true
  stone-plate: true
  button: true
  lever: true
  detector-rail: true
vehicle-support: true   # enable/disable treating vehicle with passenger on a pressure plate like the passenger on the pressure plate.
notify-owner: true      # should switch owner be notified when someone uses his switch and pays for it?
notify-owner-free: true # should switch owner be notified when someone uses his switch for free (paidswitch,use.free permission)
limits:                 # limits section, described below
  price:
    default: 0
messages: (...)         # you can translate them if you want. Remember to use /n (not \n) for new line and repeat colorcodes after each newline mark.
log-level: INFO         # set logging level, change only for debug purposes. In other cases, this should be INFO.
Limits:

Limits are configured in limits section in the config. For now, there are only price limits. More types of limits might be added in the future.

Price Limits:

Price limits are configured in price subsection of limits section in the config, They set the max price player can put on the PaidSwitch sign.
To add limit, simply add a config entry in the format limit_name: price . Then give permission node paidswitch.limit.price.limit_name to the player or group, which should be limit applied to.
Limit priority is based on its position in config. The higher a limit is placed in config , the higher priority it has.
If a player has no limit permissions, or the limit he has permission to doesn't exist, limit called 'default' is applied.
You should never give a player paidswitch.limit.price.default permission.
Zero price in limit entry means no limit. You can also give a player paidswitch.limit.price.none permission. Note that this permission has the highest priority.
Example limit section:

limits:
  price:
    default: 10
    my_cool_staff: 0
    limit2: 55
    limit1: 50
    thrusted-members: 20
    guest: 5

Actually deafult should be the last limit in the config, but for some reason it always goes to the top when config is reloaded.
Note that limits are checked only when a PaidSwitch is created, but not when somone uses it. If a player makes a switch that costs 100, and then you set the limit to 50, players who use that switch will still pay 100.

Known Bugs:

  • LWC Bug
  • Accounts don't work with BOSEconomy
  • Sometimes paid pressure plate is activated multiple times, when there are lot of entities on it.
  • "b:" before account name causes crashes if economy doesn't support banks.
  • Can't activate Paidswitches by clicking them while sitting in vehicle. (v0.4 only)
  • Vehicle support doesn't work with stone pressure plates.

Found a bug? Report it here.
Don't like Github Issue Tracker? I can switch to standard BukkitDev ticket system, just let me know.

Planned Features:

  • Detector Rail support. (done)
  • Colored messages. (done)
  • Paid Doors.
  • Permission and config node for each switch type.(done)
  • Price limits. (done)
  • Notification for switch owner when someone uses his switch. (done)
  • LWC integration (softdepend)
  • Waiting for your suggestions.

Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    38203
  • Created
    Apr 2, 2012
  • Last Released File
    Never
  • Total Downloads
    6,433
  • License

Categories

Members

Recent Files

Bukkit