[ECON] Command iConomy - Make any plugin an iConomy plugin [1.4.7, 1.5beta]

Discussion in 'Inactive/Unsupported Plugins' started by Kostronor, Jun 1, 2011.

  1. Offline

    Kostronor

    Since @deltahat is in lack of time, i will continue his plugin for him:
    Command iConomy - Charge for each command
    Version v7

    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
    ^ = Start of command
    $ = End of command
    \S+ = One or more non-whitespace characters

    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
    Download
    http://dev.bukkit.org/server-mods/command-iconomy/

    Changelog (since Kostronor):

    [COLOR=#444444][SIZE=11px][COLOR=#444444][SIZE=11px][COLOR=#444444][SIZE=11px][COLOR=#444444][SIZE=11px][FONT=Bitstream Vera Sans Mono]Version 9[/FONT][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][/COLOR]
    • Reworked against cb1597/1602
    • should work with every never build, if not please instantly contact me and i will fix it!
    • Vault support!
    [COLOR=#444444][SIZE=11px][COLOR=#444444][SIZE=11px][COLOR=#444444][SIZE=11px][COLOR=#444444][SIZE=11px][FONT=Bitstream Vera Sans Mono]Version 8[/FONT][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][/COLOR]
    • Reworked against cb1337
    • should work with every never build, if not please instantly contact me and i will fix it!
    • Register support!
    [FONT=Bitstream Vera Sans Mono]Version 7[/FONT]
    • Reworked against cb818
    • should work with every never build, if not please instantly contact me and i will fix it!
    • Initial Release
    Version 2
    • Added free permission
    • Only match first expression
    • Match but don't display zero cost commands
    Version 3
    • Increased priority of CommandPreProcess hook to improve compatibility
    Version 3.1
    • Bukkit 602 compatibility
    Version 5
    • iConomy 4.6.5 suport
    [*]Added optional logging to the console
    [*]Added optional matching of chat events
    [*]Added command cost to insufficient funds message
    [*]Verified CB612 and MC1.4 support
    [/LIST]
    Version 6
    • Added command cooldowns
    • Added fee collection account
    Version 7
    • [iConomy 5 support
    //Sidenote spoiler's are messed up so i removed them.
    //if someone is against this, he can format my post himself :p
     
  2. Offline

    MangoKiwi

    So Ur Telling Me To ? ...

    So What Are The Steps ?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  3. Offline

    Gallie

    Does this still work?
     
  4. Offline

    RiotShielder

    Im getting this error

     
  5. Offline

    Kostronor

    should be fixed ;)
     
  6. Offline

    TheBeast808

    Is this updated for 1.2+? If so, you might want to change the title to reflect that.
     
  7. Offline

    Kostronor

    still fixing events who are broken in 1.2 and as long as not stated by users testing it in real use-cases, i will not tate its working ;)
     
  8. Offline

    Flash619

    My prices.yml lists:
    But the in game command "/sethome" does not charge anything. So I guess it's not updated for 1.2.3 yet?
     
  9. Offline

    Kostronor

    yes, like i said one post above, it does not work because of a missing annotiation
    /one minute later
    it should work now since i added the mission annotiation
     
  10. Offline

    Flash619

    I just downloaded it again. It still doesn't seem to work. Is my code proper in the prices.yml?


    EDIT

    Nevermind aparently I forgot I was admin and wasn't charged.
     
  11. Offline

    pookshuman

    how can I prevent people from getting charged when they mistype something? For instance "/tp wrongname" still charges the person the same amount ... isn't there any way to charge them only if the command was successful?
     
  12. Offline

    Kostronor

    no, since every plugin works different, how should i know if the command was right?
     
  13. Offline

    pookshuman

    how about a permissions based response? like if the console gives an error to the player "You don't have permission to do that" then they wouldn't be charged

    or something like that
     
  14. Offline

    Kostronor

    Well, since i have to get this response, this could be a bit hacky. the only thing i can safely get is yes/no if it was successful, but since most plugins count successful as wrote the right syntax, this is not reliable...
     
  15. Offline

    DoomBuilderMT

    Does it support BOSEcon? If not, please fix it.
     
  16. Offline

    Kostronor

    did you read the whole post?
    did you read vault-support?
    if not, please fix it.
     
    LlmDl likes this.
  17. Offline

    DoomBuilderMT

  18. Offline

    LunisequiouS

    I can't get this plugin to work. I'm using the latest version of CommandIConomy in conjunction with Essentials and Vault, on CraftBukkit 2304 (1.2.3 R02)

    These are the contents of my prices.yml:

    Code:
    ^/home: 200 30
    ^/home \S+$: 20 30
    ^/warp \S+$: 50 30
    ^/back: 100 30
    ^/return: 100 30
    ^/tpa \S+$: 25 30
    ^/tpahere \S+$: 25 30
    ^/sethome \S+$:1000
    /back is the only command that seems to be working, although the insufficient funds message is not replacing the costs in the configuration, instead reporting "Insufficient funds (cost00)."

    For every other command I get the following message on the console

    Code:
    [SEVERE] Could not pass event PlayerCommandPreprocessEvent to CommandIConomy
    Am I doing something wrong? Any assistance would be appreciated.
     
  19. Offline

    Kostronor

    hey, is there anything more than the could no pass, that would be helpful, as i do not see anything like errors?
    perhaps, some other plugin interfers with it, perhaps essentials (just a guess)
     
  20. Offline

    LunisequiouS

    This is an excerpt of the relevant part of the server.log where the error occurs. I hope it may be of any help to diagnosing and hopefully fixing this issue.

    Code:
    2012-03-26 07:44:02 [INFO] [PLAYER_COMMAND] LunisequiouS: /warp mall
    2012-03-26 07:44:08 [SEVERE] Could not pass event PlayerCommandPreprocessEvent to CommandIConomy
    org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:441)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:811)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:778)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:761)
    at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:112)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.IndexOutOfBoundsException: No group 2
    at java.util.regex.Matcher.start(Unknown Source)
    at java.util.regex.Matcher.appendReplacement(Unknown Source)
    at java.util.regex.Matcher.replaceAll(Unknown Source)
    at java.lang.String.replaceAll(Unknown Source)
    at com.ryanmichela.cmdiconomy.CIListener.chargePlayerForCommand(CIListener.java:113)
    at com.ryanmichela.cmdiconomy.CIListener.onPlayerCommandPreprocess(CIListener.java:48)
    at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
    ... 12 more
    And here's a list of the plugins I have running in the server:

    Code:
    AuthMe
    ChestShop
    CommandIConomy
    CraftBukkitUpToDate
    Essentials
    HawkEye
    LWC
    mcMMO
    Multiverse-Core
    Multiverse-NetherPortals
    Multiverse-Portals
    NoCheat
    Pail
    PermissionsBukkit
    PluginMetrics
    Vault
    WorldBorder
    WorldEdit
    WorldGuard
     
  21. Offline

    Diedria

    I dont get how to use it, if you could post a tutorial or steps to use it that would be great.
     
  22. Offline

    Pingu22

    help?!
    am using bukkit 1.2.5 r1 and iconomy6

    Code:
    16:40:30 [SEVERE] Could not pass event PlayerCommandPreprocessEvent to CommandIC
    onomy
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:303)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:62)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:459)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
    java:814)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:781)
     
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:764)
            at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
            at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:7
    8)
            at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:551)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Caused by: java.lang.NullPointerException
            at java.util.regex.Pattern.<init>(Unknown Source)
            at java.util.regex.Pattern.compile(Unknown Source)
            at com.ryanmichela.cmdiconomy.CIListener.chargePlayerForCommand(CIListen
    er.java:71)
            at com.ryanmichela.cmdiconomy.CIListener.onPlayerCommandPreprocess(CILis
    tener.java:48)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:301)
            ... 12 more
    >
     
  23. Offline

    IsaiahRobichaud

    Will players need permission for the commands?
     
  24. Offline

    Adrenaline

    Can you update github ;d
     
  25. Offline

    KicksTV

    one of the best plugins ever!
     
  26. Offline

    FeaR_Codyy

    Is there a command that an OP can use to take a non-OPs money? Say if you own a town and you put a bunch on money into the bank and an assistant takes it all, how can I get it back without Banning him?
     
  27. Offline

    pookshuman

    Nice plugin:) any chance of an update for 1.3?
     
    anthonyc39 likes this.
  28. Offline

    dalphi

    This broke with 1.3, hoping for an update.
     
    anthonyc39 likes this.
  29. Offline

    anthonyc39

    The author hasn't logged onto bukkit for about a month and a half so im hoping someone can do a touch up and update this for 1.3.1 :D
     
  30. Offline

    skywalker007

    Will be there any update for 1.4.2 ?
     
  31. Offline

    mcferson

    No news since January ! near ONE YEAR.
    Bad, very Bad new.

    The developper SHOULD set this annoucement MORE VISIBLE.
     

Share This Page