Inactive [FUN/ECON] Vouchers v2.2.1 - Buy Vouchers for Features and Commands [1060]

Discussion in 'Inactive/Unsupported Plugins' started by Kevin Forte, May 29, 2011.

  1. Offline

    Kevin Forte

    Vouchers: Let Your Players Pay for Features and Commands (Now With Aliases!)
    ~Version: 2.2.1~
    Download: [JAR]

    I have been constantly searching for a reason for my players to want to have a Lot of iConomy money. I couldn't really find that reason, so I made one. Introducing Vouchers, a way to let your players pay their way to a God-like status.

    Current Voucher Types:
    • Protection ~ Lets a player place a block only they (or an admin) can destroy.
    • Teleport ~ Allows a player to teleport to another player or an x,y,z coordinate.
    • Heal ~ Allows a player to fully heal themselves.
    • Timeshift ~ Allows a player to set the world time.
    • Parachute ~ Allows a player to hold shift to negate fall damage once.
    • Resurrect ~ Heals a player to full health when they would otherwise die if they are holding shift.
    • Superpick ~ Allows a player to break one block instantly.
    • Sunshine ~ Allows a player to clear up storms.
    • Thunderpunch ~ Hitting a mob or player will strike them with lightning.
    • Specify your own types to coincide with any command and create aliases for those commands.
    Creating a Voucher Shop:
    Show Spoiler

    1. Place a sign. On the lines, write:
    • Line One: [Vouchers]
    • Line Two: Voucher Type for Sale.
    • Line Three: Price of Voucher. OR Price of Voucher:Amount of Vouchers Being Purchased. (Example: 50:3 <-- Purchasing 3 Vouchers for 50 gold.)
    • Line Four: Whatever you want (I personally write the commands associated with the voucher or its purpose).
    2. That's it! If done correctly, you will be sent a message and the "[Vouchers]" line will turn blue.


    Using Commands as Voucher Types:
    Show Spoiler

    As of 1.5, you'll notice a 'Hooked Commands' section has been added to the config. To add a command, format it like this:
    Hooked Commands:
            Starting Amount for New Players: 0
            Include Arguments: true
            Command: money
            Alias: showmethemoney
            Warm-Up Time: 0
            Cool-Down Time: 0
            Description: Check how much money you have.
    This will create a MoneyCheck voucher for the command /money, which can also be used with the command alias /showmethemoney. If you do not wish to use an alias for a command, simply leave the section blank. If 'Include Arguments' is true, '/money' and any following arguments will expend a MoneyCheck voucher. If 'Include Arguments' is false, the command used must match the defined command for the Voucher exactly or a Voucher won't be used. The description is what is displayed when a player types '/vhelp MoneyCheck'. See the sample config.yml for an explanation of Warm-Up Time, Cool-Down Time, and Starting Amount for New Players.

    Show Spoiler

    [] = Necessary Argument
    {} = Optional Argument
    ** = Requires Permissions
    • /vcheck ~ Shows a player how many vouchers they have of the basic types.
    • /vcheckcom ~ Shows a player how many vouchers they have of defined command types.
    • /vtp [player name]/[x] [y] [z] ~ Use a Teleport voucher. Arguments can either be another player's name or an x,y,z coordinate.
    • /vheal ~ Heals the player completely with a Heal voucher.
    • /vprotect ~ Toggles protected block placing mode. Any block placed in this mode will exhaust a Protection voucher and will only be breakable by that player or a player with the Vouchers.admin node.
    • /vtime [day/night] ~ Lets a player set the time via a Timeshift voucher.
    • /vgift [player's name] [amount] [type] ~ Lets a player send a voucher to another player.
    • /vgive [player's name] [amount] [type]
    • /vsun ~ Removes a storm if there is one.
    • /vsp ~ Toggles superpick mode.
    • /vthunder ~ Toggles thunderpunch mode.
    • /vsave ~ Saves the current Vouchers and Shop locations.
    • /vreload [commands/vouchers/settings/all] ~ Reloads config.yml data.
    • /vhelp [sign/vouchertype (case sensitive)] ~ In-game reference for setting up Voucher Shops ('/vhelp sign') or display the description of a voucher type in the config.

    Important Notice:
    This plugin requires both iConomy/BOSEconomy and Permissions! Also, before you post that you are having problems, please follow this checklist:
    • 1. Read this entire post.
    • 2. Try deleting your /plugins/Vouchers folder and letting it recreate itself.
    • 3. Make sure you have not entered invalid values into the config.yml.
    If you are still getting errors and/or having issues after that, let me know. I appreciate it!

    Show Spoiler

    • Flight Voucher
    • Superpick Voucher
    • Thunderpunch Voucher
    • Changing the sign formatting so that you can buy more than one voucher at once.
    • BOSEconomy support.
    • Item Exchange support.
    • Adding more configuration options for the current Vouchers.
    • Adding a cost to create Voucher shops.

    Show Spoiler

    • Vouchers.use.(type in all lowercase) ~ Allows a player to use a Voucher. (Example: Vouchers.use.superpick)
    • Vouchers.setup ~ Allows a player to create/remove Voucher shops
    • in all lowercase) ~ Allows a player to use a Voucher command without needing the actual voucher.
    • ~ Allows a player to use voucher shops.
    • Vouchers.admin ~ Allows a player to destroy other players' Protected Blocks, use the /vsave command, use the /vgive command, and use the /vreload command.

    • Quick Bug Fix.
    • Added a /vgive command.
    • Switched to Bukkit based permissions.
    • Removed a couple obnoxious permission error messages.
    • Delayed economy plugin check.
    • /vhelp now shows whether or not you have permissions to use the Voucher.
    Show Spoiler

    • Plugin will disable itself if an economy plugin is not found.
    • Thunderpunch Voucher added.
    • Voucher descriptions added.
    • /vhelp [voucher type/sign] command added.
    • Bug fix.
    • MAJOR Bug Fix. Consider this the recommended build of Vouchers.
    • Fixed a misplaced "You don't have permission" error message.
    • Fixed an error given if you try and use /vreload without an argument or with too many arguments.
    • Fixed a possible NPE if your config.yml is outdated.
    • Fixed /vtp not giving an error if you use an incorrect length of arguments.
    • Major Code Cleanup.
    • BOSEconomy Support.
    • Added a Ton of new config options for ALL vouchers.
    • You can now choose to include the arguments of hooked commands or not.
    • Protected blocks are now saved on server restart. Whoops!
    • /vreload command added.
    • 'Vouchers.admin' Permissions node added.
    • Fixed more potential NPEs. Damn things always sneak up on me.
    • All data is now handled with the config.yml in the plugins/Vouchers folder.
    • '' permission removed due to redundancy.
    • '[type]' re-added.
    • '' permission added.
    • NPE problem REALLY solved. Seriously.
    • NPE problem (when using command vouchers) Finally solved.
    • All players are now notified when one uses a Timeshift voucher.
    • Command aliases have been added.
    • Fixed a bug that allowed negative Voucher cost values.
    • Fixed a bug that sent players (without permissions to use Resurrect or Parachute vouchers) a message whenever they took fall damage or died, regardless of whether they tried to use the voucher or not.
    • permission added for Multiverse servers.
    • The method of setting up shops to purchase more than one Voucher from has changed.
    • /vsignhelp command added for in-game shop setup reference.

    • Removed the permissions. Will be fixed in an upcoming update.
    • Fixed command vouchers never being depleted.
    • Fixed command vouchers not being loaded correctly.
    • Added a /vsave command to try and combat the problem of losing Vouchers and shops.
    • Added the ability to create signs that allow a player to buy more than one Voucher at a time.

    • Times that /vtime sets the world to changed for longer days/nights.
    • Players must be holding shift (sneaking) for a Resurrect voucher to be used.
    • (Hopefully) Fixed the issue with command voucher arguments.

    • Players must be holding shift (sneaking) for a Parachute voucher to be used.
    • Sunshine Voucher added.

    • First attempt at making sure Resurrect vouchers aren't used for fall damage that is already cancelled by other plugins. Good catch @Joy

    • Added a Superpick Voucher.
    • Added the '/vgift' command to send other players Vouchers.

    • Added Command-Based Voucher Types.
    • Added a Permissions node required for players to use their Vouchers.

    • Original Release.
    Bradley Hilton and Mitsugaru like this.
  2. Offline

    Kevin Forte

    Can I see your commands.txt? What command are you trying to use?
  3. Offline


    I am using the /day command

    /day is a command I created in commandhelper, it is an alias for /time day
  4. Offline

    Kevin Forte

    I would try changing Day:day to Day:time day. I'm not sure how aliases work, but that might be the problem.
  5. Offline


    when I log off and back on, I can type /vcheckcon and it shows the list:
    Night Vouchers: 0
    Day Vouchers: 0
    Stack Vouchers: 0

    but right clicking on the voucher sign still gives console errors.
  6. Offline


    Does this work with essentials ecenomy
  7. Offline

    Kevin Forte

    Hmm, so changing it to the actual command and not the voucher fixed one error but not the other? Can you post the error that remained?
  8. Offline


    Changing the command didnt do anything, it failed both ways. after right clicking on a voucher sign, it will no longer let me do the /vcheckcom command.
  9. Offline

    Kevin Forte

    Just iConomy for now, sorry. ):

    My assumption is is that it's because it's trying to go through the second plugin that is using non-traditional command methods to issue a command and my plugin, which is basic and stupid, just says "Wtf." I'll try and get it touch with the CommandHelper dev and see what can be done about this.

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


    Let me take that back, i've been playing with it a bit.

    when I log in fresh, I can use the commands /vcheck and /vcheckcom. I can use the builtin, default voucher commands. I am able to build a voucher shop (the sign turns blue). When I right click on the shop I get no response on the screen, but I do get an error on the console.

    2011-06-07 23:02:23 [SEVERE] Could not pass event PLAYER_INTERACT to Vouchers
        at kforte318.Vouchers.VouchPL.onPlayerInteract(
        at org.bukkit.plugin.RegisteredListener.callEvent(
        at org.bukkit.plugin.SimplePluginManager.callEvent(
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(
        at net.minecraft.server.ItemInWorldManager.interact(
        at net.minecraft.server.NetServerHandler.a(
        at net.minecraft.server.Packet15Place.a(SourceFile:57)
        at net.minecraft.server.NetworkManager.b(
        at net.minecraft.server.NetServerHandler.a(
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(
  11. Offline


    Ok thanks. I'll definitely get it when Essentials gets support though :)
    Nicolasgreen17 likes this.
  12. Offline


    thanks, the author does a bunch of well known plugins, worldedit, worldguard, etc, and works on bukkit itself. Hopefully you'll be able to find what the disconnect is.
  13. Offline

    Kevin Forte

    I'll look into it :)
    Yeah, I'm sure I'll be able to find him. I've spoken to him before, so it shouldn't be too big of an issue.
  14. Offline


    This looks great for what I want to do with my server. I'll keep an eye on this and wait for essentials compatibility.
  15. Offline


    How exactly does this mod work with quantities of vouchers? I would use this to allow my users to use something like /warp for a cost, but if they buy the voucher, does that mean they can use it unlimited times? Just once? Or can they buy a stock of them at once (buy 10 times and then be able to use 10 times in the future)? =
  16. Offline

    Kevin Forte

    The last one. One voucher = one use, so they can buy as many as they want and then use them as they please.
  17. Offline


    Excellent, exactly what I was looking for. I'll invest in this plugin for sure and give any suggestions and praises once I figure it out :)
  18. Offline

    Kevin Forte

    Awesome, great to hear :) Hope ya like it.
  19. Offline


    I'm unable to purchase my custom commands voucher. I have it set up properly so the sign name turns blue. The command is the /i command and in the commands text I have it set as Item:i. I am an administrator with rights to all commands with *. Please help?

    I can purchase the default vouchers, but I can't purchase my custom voucher. I have iconomy set-up and working.
  20. Offline


    Can you add OP Permissions support?

    Non-OPs would get the enabled and user permission.
    OPs would get everything.
  21. Offline

    Kevin Forte

    Can you post your console error?

    That I can.

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

    King Rat

    I installed this a few days ago and it's great! Really good way to get people spending money and the signs are easy to understand.
    Only problem, whenever my server restarts or anything the signs just stop working. I'm not getting any errors, but they just stop completely. Am I missing something here?
  23. Offline

    Kevin Forte

    That's really odd and I have no idea why that might be happening. I restart my server a Lot due to problems with my internet connection, and the signs have never broken. Do you get any errors or anything?
  24. Feature request:

    Make it so players can transfer/give/send their Voucher(s) to another player. Would be great!
  25. Offline

    Kevin Forte

    So, basically voucher gifting? I can do that.
  26. Yes, that way I can actually turn it into a player-run feature ;)
  27. Offline

    Kevin Forte

    Good thinking :p I'll work on it when I get a chance, today's a busy day.

    Actually, I think I'm going to leave Permissions a dependency. It isn't too hard to set up :p You can PM me if you want help.

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



    I want my player can buy a voucher to make /spawn , I have add

    spawn:spawn in my command.txt

    And they can buy the vouchers , they can use , but they don't go to the spawn , because , /spawn is not to permission.

    It's possible to use with voucher a command , who are not in permission ?


    Sory for my bad english
  29. Offline

    King Rat

    Nope, not getting any errors... There was a plugin called ColorSign that stopped the signs working at first, but I've deleted that now, and don't have any other sign editing plugins D:
  30. Offline


    Actually that was working correctly.

    It was working with Most plugins on bukkit besides minecartmania once
  31. Offline

    King Rat

    I didn't mean ColorSign was broken or anything, because I'd been using it for a while and it was great, but it seemed to stop the Vouchers working the moment anyone scrolled while looking at it. But I'm terrible with Java in general, so I have absolutely no idea how this kinda stuff works at the moment ^_^

Share This Page