Command iConomy
Command iConomy - Charge for each command
PLEASE OPEN A NEW TICKET FOR EVERY ISSUE, THERE WILL BE NO HELP IN COMMENTS!
Version v10.0.0
Overview
Command iConomy is a plugin that allows a server admin to assign a cost to server commands that is deducted from a player's iConomy account whenever a player uses that command. Commands are matched using java regular expressions. If text entered by a player matches a configured rule, Command iConomy will attempt to bill the player. Command iConomy requires Vault!
Examples include charging for each summoned magic carpet, or adding a fee for different kits.
Configuration
To set the price of a command, add a line to prices.yml. Command iConomy matches regular expressions against user input. Regular expressions allow you to charge separately for individual sub-commands or even specific command arguments.
A typical configuration line looks like this: ^/tp$: 10
A configuration line matching sub-commands might look like this: ^/time (day|night)$: 20
Command expressions are matched in order from top to bottom. If a match is found, Command iConomy stops looking for a match and charges the player the configured amount. If the command is configured with a cost of zero, processing will stop but the player will not be charged. Together these features allow open ended commands to be individually charged. Ex:
^/warp help$: 0
^/warp \S+$: 10
Really Quick Regular Expression Info
<<code>>
^ = Start of command
$ = End of command
\S+ = One or more non-whitespace characters<</code>>
For best results, please study and learn regular expressions!
For more info on regular expressions, see: http://www.regular-expressions.info/reference.html
Command Cooldowns
You can now configure a number of seconds before charging a player again for a command. To do so, add a space and then the number of seconds to wait after the command's cost. Ex:
^/warp \S+$: 10 30
Permissions
CommandIConomy.Free - Grants free access to all commands.
Internationalization
Three additional settings can be made in the config.yml file to localize Command iConomy's text. You will have to create config.yml. They are:
NoAccountMessage
InsuficientFundsMessage
AccountDeductedMessage
Substitute (cost) for cost
Requires Vault:
http://dev.bukkit.org/server-mods/vault/
@Kostronor
Will do. Haven't restarted since switch to verbose, but that'll come later. Here are configs (they worked in 1.1, fyi)
Config:
Verbose: true
ChargeForChat: false
#PayTo: accountName
UseamountMultiplier: false
NoAccountMessage: No bank account.
InsuficientFundsMessage: Insuficent funds. (cost) needed.
AccountDeductedMessage: Charged (cost)
Prices:
^/spawn: 50 10
^/home: 150
^/heal: 1000 10
^/jump: 100 10
^/j: 100 10
^/back: 100 10
^/depth: 1
^/top: 100
^/sethome: 500
^/kit dtools: 6500 10
^/tpa$: 100 10
@quickclay Could you further investigate this, enable verbose mode and tell me some console-output on start and on command-execution (and perhaps, that there was nothing) and please paste me your config files both :)
@Kostronor
Users are reporting that previously charged commands are now free in this version.
@Kostronor
Awesome! Thanks.. I will test and let you know if anything isn't working.
@quickclay i made a fix for 1.2.3 and it is now working there, but i did not released it to bukkitdev, because i simply changed the file in dropbox without any big announcement. for reference: http://dl.dropbox.com/u/28093398/CommandIConomy.jar
Anyone know if this is working in 1.2.3? I saw a startup error during a test run, but it might have been because I hadn't upgraded to Iconomy 6 yet.
@hqt99 well, to keep this universal, the plugin works like this:
1. A player issues a command 2. the command will be send to Command-IConomy and it checks if the player can do it etc. and charges the player 3. the command is send to the plugin intended to receive the command and there things like permissions are checked. and since every plugin works different, i would need plugin devs to support my plugin defeating every purpose of it :D
Is there any way to have it so if the player does not have permission to use a command it will not charge them when they try? Maybe charge them after the command executes? Not sure I do not know how to code.
Noo! Just get boosCooldowns np98765!
This plugin does it's job--and damn well.
Don't add anymore fluff.
Quick ?: Anyway you can add command-specific permission nodes?
@np98765 Well, since my plugin works the way, that it looks at the command before it is executed and perhaps cancels it, i would have to cancel the command and let the player issue a new command somewhat later, this could get confusing for other plugins using CommandPreProcess and they could see the player issuing two command etc. If you want that, then a warmup would be possible
Could you add a warm-up time also? So that the user cannot quickly warp when they see, for example, a creeper?
So
^/warp market$: 5 30 10
^ ^
Cooldown Warm-up
Thanks a lot =) for Update
Got it working just needed to update vault
Tell me why its not working please
2012-01-11 17:45:22 [SEVERE] Could not pass event PLAYER_COMMAND_PREPROCESS to CommandIConomy java.lang.NoSuchMethodError: net.milkbowl.vault.economy.Economy.hasAccount(Ljava/lang/String;)Z at com.ryanmichela.cmdiconomy.CIListener.chargePlayerForCommand(CIListener.java:80) at com.ryanmichela.cmdiconomy.CIListener.onPlayerCommandPreprocess(CIListener.java:47) at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:293) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339) at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:750) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715) at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33) at net.minecraft.server.NetworkManager.b(NetworkManager.java:226) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:93) at net.minecraft.server.NetworkListenThread.a(SourceFile:108) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425) at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
@Xickle
@MaxKalus
@datwerd86
@Amrac59
Not broken anymore. Since i received no notifications about anything posted on bukkitdev, i was fixing the plugin in the bukkit-forums. i will try to change some settings in bukkitdev to be notified about comments, but please open tickets for issues of any kind, this will help ;) Plugin works with Bukkit-Build-In Permissions and Vault like intendet
@Royalgamer06 Hey Royalgamer06 This error is because you needed Register, since Vault this is now past. If you have Vault in your plugin-folder than you have nothing to care for, because vault will pass your economy to my plugin :)
@MaxKalus Hey MaxKalus, i am not angry but i also support Vault now :P sorry for not reading comments on Bukkitdev but their notification-system was broken >.<
Hello people - look at BuyCommand - this will be the platform for the new Vault based plugin. I hope Kostronor is not too angry at me for splitting off a branch of his plugin.
I will publish a Vault based Plugin version of this plugin shortly :-)
MaxKalus, can you take control of the plugin?
I think you need to create a new plugins with same name/source to take the control on the dev.bukkit project.
The actual Command Iconomy is broken :/