[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

    KaoValin

    The following did not match the commands /i stone 2 or /i 1 2 respectively. I tried each of these by themselves one at a time reloading the entire server each time between commands. There were no errors at the console and no money had been charged. When I get this working with you I can definitely help you write that tutorial. It's the least I can do.

    /i stone \d+(amought)(?:/i stone )\d+: 2
    /i stone \d+(amount)(?:/i stone )\d+: 2
    ^/i stone \d+(amount)(?:/i stone )\d+: 2
    ^/i stone \d+(amought)(?:/i stone )\d+: 2
    ^/i stone \d+(amought)(?:/i stone )\\d+: 2
    /i stone \d+(amought)(?:/i stone )\\d+: 2
    ^/i stone \d+(amount)(?:/i stone )\\d+: 2
    /i stone \d+(amount)(?:/i stone )\\d+: 2
    /i 1 \d+(amought)(?:/i 1 )\d+: 2
    /i 1 \d+(amount)(?:/i 1 )\d+: 2
    ^/i 1 \d+(amount)(?:/i 1 )\d+: 2
    ^/i 1 \d+(amought)(?:/i 1 )\d+: 2
    ^/i 1 \d+(amought)(?:/i 1 )\\d+: 2
    /i 1 \d+(amought)(?:/i 1 )\\d+: 2
    ^/i 1 \d+(amount)(?:/i 1 )\\d+: 2
    /i 1 \d+(amount)(?:/i 1 )\\d+: 2
     
  3. Offline

    Kostronor

    ok, first, i'll try it myself again, i've tested it but perhaps not much enought :D

    ok, this one now please :)
    ^/i stone \d+$(amount)(?:^/i stone $)^\d+$: 2
    and
    ^/i stone \d+$(amount)(?:^/i stone )\d+$: 2
    @KaoValin

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

    KaoValin

    That's a negatory on both commands. Again no errors detected at console. If you would like to test these out yourself, I am using the plugin AdminCmd. I would also be using this multiplier for summoning mobs for the limited number of individuals with permissions.

    Do you find that it works for the vanilla minecraft server? I can try testing this with more plugins but this is the main plugin I would be needing this multiplier for in the first place.
     
  5. Offline

    WhiteDragon

    My Command iConomy doesn't seem to be working/charging money.
    I have BR 1337, Heroes, Factions, iConomy 6, bPermissions, and Command iConomy
    this is my config.yml
    Code:
    Verbose: true[/S]
    [S]ChargeForChat: false[/S]
    [S]#PayTo: accountName[/S]
    
    [S]NoAccountMessage: No bank account.[/S]
    [S]InsuficientFundsMessage: Insuficent funds. {cost} needed.[/S]
    [S]AccountDeductedMessage: Charged {cost}[/S]
    [S]

    This is my prices.yml
    Code:
    # To charge for a command, list a matching regular expression below on its own[/S]
    [S]# line with the price, separated by a colon. For more info on regular expressions[/S]
    [S]# see http://www.regular-expressions.info/reference.html[/S]
    
    [S]# ^/tp: 10[/S]
    [S]^/f create\S+: 20000[/S]
    [S]^/f sethome\S+: 5000[/S]
    [S]^/f home$: 1000[/S]
    [S]^/skill Recall$: 1000[/S]
    [S]^/skill recall$: 1000


    This is the error I get when I use /skill recall
    Code:
    2011-11-03 08:55:55 [SEVERE] Could not pass event PLAYER_COMMAND_PREPROCESS to Command iConomy[/S]
    [S]java.lang.NoClassDefFoundError: com/iConomy/iConomy[/S]
    [S]    at com.ryanmichela.cmdiconomy.CIListener.chargePlayerForCommand(CIListener.java:80)[/S]
    [S]    at com.ryanmichela.cmdiconomy.CIListener.onPlayerCommandPreprocess(CIListener.java:46)[/S]
    [S]    at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:288)[/S]
    [S]    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)[/S]
    [S]    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)[/S]
    [S]    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:750)[/S]
    [S]    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722)[/S]
    [S]    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715)[/S]
    [S]    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)[/S]
    [S]    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)[/S]
    [S]    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)[/S]
    [S]    at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:501)[/S]
    [S]    at net.minecraft.server.NetworkListenThread.a(SourceFile:108)[/S]
    [S]    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)[/S]
    [S]    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)[/S]
    [S]    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)


    What am I doing wrong here? I don't have OP powers or admin. I'm not using the free permissions node ether. I have also tried using Register but I get the EXACT same error.[/CODE][/S]

    ********NEW ISSUE********
    My Command iConomy doesn't seem to be working/charging money.
    I have BR 1337, Heroes, Factions, iConomy 6.0.7b (also tried 6.0), bPermissions, Register 1.5, and Command iConomy
    this is my config.yml
    Code:
    Verbose: true
    ChargeForChat: false
    #PayTo: accountName
    UseamountMultiplier: false
    NoAccountMessage: No bank account.
    InsuficientFundsMessage: Insuficent funds. {cost} needed.
    AccountDeductedMessage: Charged {cost}
    
    This is my prices.yml
    Code:
    # To charge for a command, list a matching regular expression below on its own
    # line with the price, separated by a colon. For more info on regular expressions
    # see http://www.regular-expressions.info/reference.html
    #
    # ^/tp: 10
    # To add a multiplier to a command like /i or /give so it charges for every item not for the whole command:
    # ^/give stone 10(amount)(?:/give \w+ )\d+: 10 will cost 10*10=100
    # (?:<regex>) is a noncapturing group, so it will be included in the match but will not alter the returned amount
    
    ^/f create\S+: 20000
    ^/f sethome\S+: 5000
    ^/f home$: 1000
    ^/skill Recall$: 1000
    ^/skill recall$: 1000
    This is the ERROR
    Code:
    2011-11-03 09:33:29 [INFO] [Command iConomy] Cannot charge for command, no Iconomy-System registered yet!
    I have done this: register has to be in your plugin-folder i think https://github.com/iConomy/Register
    http://dl.dropbox.com/u/28093398/debug/CommandIConomy.jar

    Any help would be nice. If you need to ask me questions, go ahead, ill answer them.

    ALSO i see a few of you have it working with iConomy 6. Could you post the exact version you are using and what RB you are using plz? I might be able to change to them without breaking my other plugins.

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

    Kostronor

    try redownloading please, this could be due to you having an old version, this bug is fixed some time ago.
    rb 1337 works fine :)

    found a bug in the charging process, #fixed#

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

    WhiteDragon

    i have redownloaded them and i get the same issue.

    Question: Register: I go HERE or HEREv2 (HEREv2 would be a download of Register-1.5.jar). I put the .jar into my plugins folder.

    Then I download http://dl.dropbox.com/u/28093398/debug/CommandIConomy.jar and put that in my plugins folder.

    Then I go here for iConomy v6: http://dev.bukkit.org/server-mods/iconomy/ and i download the Download Latest Stable Build and i install this into the plugins folder.

    I start and stop the server. Make the changes to the CommandIconomy config.yml to verbose=true and then go into price.yml and make change this for my prices.

    I also re-downloaded RB 1337 and replaced the one that was there before in case some how it was a different version

    Right now the issue im getting with the new downloads of them is that the CommandIConomy isn't creating a folder. I was able to fix this by using a Download of CommandIConomy.jar I downloaded a couple days ago. I think the one in my link above is a bad Download or corrupted.

    As to why this plugin doesn't work for ME ONLY....the plugin works..... Heroes BREAKS Register and then after Register Breaks iConomy 6. Some of my other iconomy plugins work fine but this one doesn't once I install heroes. Also EconomyPunga breaks this plugin too.

    May I suggest that you add a list of plugins that possibly break this pluin into the first post for people? Just so people have an idea of possible issues that might arise.

    Anyways good plugin.

    do you have an older version that supports iConomy 5 but doesn't require Register?

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

    Kostronor

    like stated somewhere above in this thread, register is currently inactive or seems so.
    I will add an option to exclude register and use ico5 instead
     
  9. Offline

    WhiteDragon

    Sounds awesome thanks
     
  10. Offline

    Amrac

    Build 1337, Iconomy V6 with and without register, i got this error: :-(
    Ps: Thanks a lot for this cool plugin :)
     
  11. Offline

    timzy

    Same here. ._.
     
  12. Offline

    LlmDl

    @Kostronor I'm looking for the link to get v8 but all the versions I'm finding have v7 in their plugin.yml.
     
  13. Offline

    KaoValin

    I'm getting the same error as Amrac. I wonder if it has anything to do with his name being karma backwards? Let's blame him (jk).
     
  14. Offline

    Kostronor

    thats because i forgot to edit the .yml ;)
     
    KaoValin likes this.
  15. Offline

    LlmDl

    Zing, so the one you and everyone keep linking is the "v8", thanks I just wanted to confirm it.
     
  16. I'm getting an error while loading here's the log.
    Code:
    2011-11-08 13:47:31 [INFO] Starting minecraft server version Beta 1.8.1
    2011-11-08 13:47:31 [INFO] Loading properties
    2011-11-08 13:47:31 [INFO] Starting Minecraft server on *:6117
    2011-11-08 13:47:31 [WARNING] **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
    2011-11-08 13:47:31 [WARNING] The server will make no attempt to authenticate usernames. Beware.
    2011-11-08 13:47:31 [WARNING] While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.
    2011-11-08 13:47:31 [WARNING] To change this, set "online-mode" to "true" in the server.settings file.
    2011-11-08 13:47:31 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-1131-g86b7fa8-b1337jnks (MC: 1.8.1)
    2011-11-08 13:47:31 [SEVERE] Could not load 'plugins\CommandIConomy.jar' in folder 'plugins':
    java.lang.NoClassDefFoundError: com/vladium/emma/rt/RT
        at com.ryanmichela.cmdiconomy.CIPlugin.$VRi(CIPlugin.java)
        at com.ryanmichela.cmdiconomy.CIPlugin.<clinit>(CIPlugin.java)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:170)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:215)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:136)
        at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:112)
        at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:52)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:136)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Caused by: java.lang.ClassNotFoundException: com.vladium.emma.rt.RT
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 13 more
    2011-11-08 13:47:31 [INFO] [Register] Preferred method [null] not found, using first found.
    2011-11-08 13:47:31 [INFO] [Register] version 1.5 is enabled.
    2011-11-08 13:47:31 [INFO] Preparing level "Iskra"
    2011-11-08 13:47:31 [INFO] Default game type: 0
    2011-11-08 13:47:31 [INFO] Preparing start region for level 0 (Seed: 1626615012)
    2011-11-08 13:47:32 [INFO] Preparing start region for level 1 (Seed: 1626615012)
    2011-11-08 13:47:32 [INFO] [AutoItemBarReload] Stats are being kept for this plugin. To opt-out for any reason, check plugins/stats.
    2011-11-08 13:47:32 [INFO] [AutoItemBarReload] version 1.2.1 is enabled.
    2011-11-08 13:47:32 [INFO] [CreeperHeal] Loaded 0 traps
    2011-11-08 13:47:32 [INFO] [CreeperHeal] Loading config
    2011-11-08 13:47:32 [INFO] [CreeperHeal] Loading world: Iskra
    2011-11-08 13:47:32 [INFO] [CreeperHeal] Loading world: Iskra_nether
    2011-11-08 13:47:32 [INFO] [CreeperHeal] version 4.1 by nitnelave is enabled
    2011-11-08 13:47:32 [INFO] [iConomy - Celty] Enabled (20 ms)
    2011-11-08 13:47:32 [INFO] [Lumberjack] version 1.8.1v6 enabled!
    2011-11-08 13:47:32 [INFO] [Lumberjack] Player settings file doesn't exist yet
    2011-11-08 13:47:32 [INFO] [MoneyDrop] Startup complete.
    2011-11-08 13:47:32 [INFO] NoWeather version 1.6 is enabled!
    2011-11-08 13:47:32 [INFO] [Runecraft] Rune blacklist with 0 runes loaded.
    2011-11-08 13:47:32 [INFO] [Runecraft] Loaded:
    2011-11-08 13:47:32 [INFO] [Runecraft]  - 6 waypoints, 13 teleporters
    2011-11-08 13:47:32 [INFO] [Runecraft]  - 0 position runes
    2011-11-08 13:47:32 [INFO] [Runecraft]  - 0 rune pads
    2011-11-08 13:47:32 [INFO] [Runecraft]  - 3 player data sets
    2011-11-08 13:47:32 [INFO] [Runecraft]  - 95 block runes
    2011-11-08 13:47:32 [INFO] [Runecraft] World 'Iskra': id 0.
    2011-11-08 13:47:32 [INFO] [Runecraft] World 'Iskra_nether': id 1.
    2011-11-08 13:47:32 [INFO] [Runecraft] Runecraft 2.9.1 initialized.
    2011-11-08 13:47:32 [INFO] Runecraft plugin version 0.5 is enabled!
    2011-11-08 13:47:32 [INFO] [DeathControl] loaded 3 lists!
    2011-11-08 13:47:32 [INFO] [DeathControl] loaded 17 valid death causes!
    2011-11-08 13:47:32 [INFO] [DeathControl] is now using bukkit permissions!
    2011-11-08 13:47:32 [INFO] [DeathControl] version 1.3 is enabled!
    2011-11-08 13:47:32 [INFO] [mcMMO] Using Bukkit Permissions.
    2011-11-08 13:47:32 [INFO] Loading Config File...
    2011-11-08 13:47:33 [INFO] mcMMO version 1.1.17 is enabled!
    2011-11-08 13:47:33 [INFO] [Register] Payment method found (iConomy version: 6)
    2011-11-08 13:47:33 [INFO] Server permissions file permissions.yml is empty, ignoring it
    2011-11-08 13:47:33 [INFO] Done (0.229s)! For help, type "help" or "?"
    2011-11-08 13:47:38 [INFO] [MoneyDrop] Connected to Register. Item pickups functional.
    
     
  17. Offline

    Taroan

    CB#1337, it's the first plugin to load. I'm getting the same as @Amuxix as below. Plugin list:
    Code:
          Advanced   Bans       BorderGuard       ButtonWarp       Cenotaph  CFBanner  Command iConomy       CommandBook       CraftBook        CraftIRC        Dynamic Effect Whitelist        HeroChat        iConomy        LocalShops       LogBlock        Lottery        LWC       mcMMO        MobArena        MobBounty       MobDisguise        ModTRS       MonsterHunt       MultiVerse        Nethrar        NoCheat        NoFarm        OreObfuscation        PermissionsEx        SignColours        Spout        Towny Advanced        WeatherRestrictions       WorldEdit       WorldGuard       Citizens       TempleCraft       Blockcount       Lavafurnace       Landmarks,       MapMarkers,       Multiverse portals       MultiIn       properTime,       Questioner,       Vault  
    Code:
    2011-11-08 23:14:53 [SEVERE] Could not load 'plugins/CommandIConomy.jar' in folder 'plugins':
    java.lang.NoClassDefFoundError: com/vladium/emma/rt/RT
    	at com.ryanmichela.cmdiconomy.CIPlugin.$VRi(CIPlugin.java)
    	at com.ryanmichela.cmdiconomy.CIPlugin.<clinit>(CIPlugin.java)
    	at java.lang.Class.forName0(Native Method)
    	at java.lang.Class.forName(Class.java:247)
    	at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:170)
    	at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:215)
    	at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:136)
    	at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:112)
    	at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:52)
    	at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:136)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Caused by: java.lang.ClassNotFoundException: com.vladium.emma.rt.RT
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
    	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    	... 13 more
     
  18. Offline

    kracky

    same error here... :/
     
  19. Offline

    Kostronor

    ok, this error comes from a testing tool called emma, whyever it is in my plugin, it should not!
    try redownloading my plugin from the main download
     
  20. Just redownloaded from http://dl.dropbox.com/u/28093398/CommandIConomy.jar and still I'm getting same error.

    Ok, Downloaded from gituhb link (https://github.com/downloads/rmichela/Command-iConomy/CommandIConomy.jar) and it works without any errors, you should upload link in the first post :)

    I can't make it work :(
    my config.yml is
    Code:
    Verbose: true
    ChargeForChat: false
    #PayTo: accountName
    UseamountMultiplier: true
    NoAccountMessage: No bank account.
    InsuficientFundsMessage: Insuficent funds. {cost} needed.
    AccountDeductedMessage: Charged {cost}
    my prices.yml is
    Code:
    # To charge for a command, list a matching regular expression below on its own
    # line with the price, separated by a colon. For more info on regular expressions
    # see http://www.regular-expressions.info/reference.html
    #
    # ^/tp: 10
    # To add a multiplier to a command like /i or /give so it charges for every item not for the whole command:
    # ^/give stone 10(amount)(?:/give \w+ )\d+: 10 will cost 10*10=100
    # (?:<regex>) is a noncapturing group, so it will be included in the match but will not alter the returned amount
     ^/i stone 10(amount)(?:/give \w+ )\d+: 10 
    I just used your line to see if it worked but I can't seem to make it take money away I'm using iConomy 6 and got Register 1.5
     
  21. Offline

    Kostronor

    ok, i found the error:
    it was something with my ide and a new plugin i installed for it.
    well, deinstalled it now it works.
    redownload please ;)
     
  22. I redownloaded and it doesn't seem to work it charges no money for commands nor does it set them in cooldown
     
  23. Offline

    Kostronor

    well, did you see any errors?
    what economy-plugin are you using?
    do you use register?
    your config?
    your server.log?
    any plugins altering chat/commands?
    what were you doing?
    some more information please ;)
     
  24. No errors at all, using iConomy 6 yes I use register 1.5 don't think I have any altering commands I got command book and permissions that might be it my config file looks like this:
    Code:
    Verbose: true
    ChargeForChat: true
    #PayTo: accountName
    UseamountMultiplier: false
    NoAccountMessage: No bank account.
    InsuficientFundsMessage: Insuficent funds. {cost} needed.
    AccountDeductedMessage: Charged {cost}
    I've got only 1 line in prices as I was testing, its this line:
    ^/i:10

    I was using /i 1 and /i stone for testing and my money never dropped also what I pretend to do is charge money based on the amount and the item you receive using /i
     
  25. Offline

    Taroan

    Thanks Kostronor, that's now loading up without error.

    I have two new issues though, don't think it's anything more than an oversight on my part, but would be grateful if you could advise.

    My prices yml is as follows:
    Code:
    ^/sethome$: 150
    ^/home$: 50
    
    ^/spawn$: 150
    
    ^/landmark (set|add) \S+$: 15000
    and my config.yml

    Code:
    Verbose: false
    ChargeForChat: false
    PayTo: ServerBank
    
    NoAccountMessage: No bank account.
    InsuficientFundsMessage: Insuficent Gil. {cost} needed.
    AccountDeductedMessage: Charged {cost}
    Money is correctly debited from the players' accounts, however the message is "Charged {cost}" rather than "Charged 150" or w/e.

    Secondly, I also have - CommandIConomy.Free set up for some players in PEX1.15, but they are being charged nevertheless.

    Your plugin has been installed almost without fault on my server for months. It's been so long since I had to look at it! Perhaps my config lines are just out of date. If you had anything to suggest about where I've gone wrong, that would be most appreciated.
     
  26. Offline

    Kostronor

    Please read the linked regex-page on top-post

    ^/i: 10 will ONLY charge for /i
    first, i changed {cost} to (cost) to simplify it a bit
    I use the Bukkit-Implemented Permissions, with them it works, perhaps you have to ask the author of PEX why it does not work

    I'm glad the update works for you :D
     
  27. Offline

    RG_PankO

    Code:
    06:47:42 [SEVERE] Could not pass event PLAYER_COMMAND_PREPROCESS to Command iCon
    omy
    java.lang.NoClassDefFoundError: com/iConomy/iConomy
            at com.ryanmichela.cmdiconomy.CIListener.chargePlayerForCommand(CIListen
    er.java:80)
            at com.ryanmichela.cmdiconomy.CIListener.onPlayerCommandPreprocess(CILis
    tener.java:46)
            at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.ja
    va:288)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava: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:92)
            at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java
    :500)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Any ideas?

    ^/dd teleport \S+$: 1

    The command is /dd teleport world_name
    am I doing it correct @Kostronor ?

    I tried and even with ^/home$ and it poped up the same error :/
     
  28. Offline

    Kostronor

    This is nothing with your command, the problem is, that my plugin cannot find iconomy
    do you use register?
    do you use the latest version? (redownload to be 100% sure ;) )
    what version of iconomy did you use?
     
  29. I've redownloaded latest version to make sure I had it right and tested again used these lines in the prices.yml:
    ^/i \w+: 10
    ^/i stone: 10
    ^/i 1: 10
    ^/give stone 10(amount)(?:/give \w+ )\d+: 10
    ^/give \w+: 10
    ^/give stone: 10
    ^/give 1: 10

    The full list of addons I use is:
    Code:
    AutoItemBarReload ComandBook CommandIConomy CreeperHeal DeathControl iConomy6 Lumberjack mcMMO MoneyDrop NoWeather Register 1.5 Runecraft
    
    Tryed all together and one by one none worked I'm using bPermissions and the group im in does NOT have CommandIConomy.Free whenever I use the commands it gives the item but never takes money nor gives any message.
     
  30. Offline

    Kostronor

    if you start a string with ^ you have to end it with a $ the $ has to be the last char before the :
    ;)
     
  31. Offline

    RG_PankO

    I redownloaded iConomy - latest version, I knew the problem might be in it.
    I use xAuth for /register, /login
    Latest bukkit RB.
     

Share This Page