PaidSwitch
PaidSwitch
Make your players pay other players for using their switches.
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 BugAccounts 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.
Nice :) I have been waiting this kind of plugin for a long time...
@Anormalcat
Good idea, I'll add it to list.
About timer - you can always use a button. It would be difficult to make a timer for switches, so it will be just for doors (wood, iron, and trapdoors)
And thanks for feedback
Feature(s) i'd like to see
Paid doors EX: Wood Iron and trap
Timers for doors (That fourth line is useless as is, Why not give it a purpose in life?)
EX so if you pay for a lever it wont leave said door open for all eternity
@EpicBlargh
You can use account instead of player name.
What economy do you use?
Amazing. Great idea too, but you need to make it so that we can have switches that don't go to anyone. You just have to pay to use it.
@App1eGenius93
I'm really happy you enjoy it.
I'm gonna work on some new features as soon as I finish maintenance on my server.
Has anyone found any bug? If so, give me a feedback.
@Wolf480pl
Awesome! Your welcome! Love the plugin! Works great!
@jaygigo
You can always create account "Admin" and put it's name on the sign.
Hi, I was just wandering if instead of putting a name for Line 2 that you could put Admin and it wouldn't pay anyone in general, it would just take the money away from the players.
@App1eGenius93
Fixed it!
v0.3.1 works ok with BOSEconomy accounts, you just need to put "b:" before account name.
And thanks for feedback.
@App1eGenius93
Hmm... I don't know why it happens.
Worked OK with iConomy accounts, but they wasn't bank accounts.
I don't know how does BOSEconomy treat accounts, and how does Vault treat BOSEconomy. I'll take a look at it.
EDIT:
I know what's wrong.
iConomy treats accounts as players, BOSEconomy treats accounts as banks.
I'll fix my plugin to work with BOSEconomy accounts soon.
Hi, great plugin! Just have a question about using an account. When I type:
[PaidSw] Admin 10
It says account doesn't exists. We use boseconomy and have a bank account "Admin". Am i doing something wrong or am I misunderstanding support for accounts?
Thanks!
Wow, 100 downloads. Do you think it's something to celebrate?
Good news for every awesome person using my plugin:
I'm currently working on detector rail support and it will be out soon.
@Zombiemold
Yes, there still is some debug spam in this plugin. Will be removed in next build.
About signless method:
It would require database, so it wouldn't be so lightweight.
I also want it to be similar to ChestShop, which is sign-based, too.
And what if someone needs to press button very fast, eg. to get instant health splash potion from dispenser? It would require 2 clicks, but he can be dead already, when the potion is thrown.
Anyway, thanks for feedback.
Great so far, I am liking this. Always wanted a plugin like this.
Firstly, there is a little issue with the string when someone hits a switch. It says "\n" in it, not sure what it's supposed to do.
Secondly, in the future development, I would love to see a signless way of doing this, to preserve designs.
I imagine you could warn the user on their first press of the switch that this is a paid switch, not triggering it. Then any subsequent uses would charge as normal.
Then with that, switches could be made paid switches by command in addition to the sign method. Just an idea, the mod works great anyhow :D Keep up the great work.
@lucoatom
Yes, it does. It uses Vault to handle economy, and Vault supports iConomy 4, 5 and 6
Does it support iConomy 6? Because I use it and this looks like a promising plugin :)