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


    Question about /vtime day. Is it supposed to set the time for late afternoon? My players thought they would be able to set the time back to morning with their voucher.
  3. Offline

    Kevin Forte

    I'm going to change that.
  4. Offline


    I'm in the same situation as Asianator where the custom command vouchers can't take arguments. For example, I made a Warp voucher (Warp:warp) in commands.txt. You can buy the warp vouchers just fine, but using the warp command with all its arguments (/warp <warp name>]) does not affect the vouchers you have on you. The command and the vouchers aren't interacting with each other at all. However, if you just use "/warp" without any arguments, the number of vouchers does reduce and behave the way it should.

    I would like to know if you are making any headway on this. I've been looking for a plugin like this and it would be great if you could look into this problem.
  5. Offline


    When I restart my server my voucher no longer work.

    I'm wondering if LWC sign protect is causing an issue.
  6. Offline


    I am also having a problem when I restart the server. Signs don't work and all vouchers in players inventory are deleted. I don't have LWC so that isn't related to my issue.
  7. Offline

    Kevin Forte

    I'll look into it soon.
    It isn't, I have LWC on my server and it works just fine.
    Is everything up to date? I have no friggen idea why you're having this issue. I haven't ever had this problem, not even since I wrote the thing.
  8. Offline


    Everything is up to date. I reset everything again. I am not sure where to start since there are no error messages being thrown. I think the issue is writing to shops.txt and vouchers.txt. shops.txt has never had data written to it. vouchers.txt had some data, but hasn't had any new information since I reset everything.

    2011-07-04 02:25:09 [INFO] Starting minecraft server version Beta 1.7.2
    2011-07-04 02:25:09 [INFO] Loading properties
    2011-07-04 02:25:09 [INFO] Starting Minecraft server on
    2011-07-04 02:25:09 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-904-g9277096-b953jnks (MC: 1.7.2)
    2011-07-04 02:25:10 [INFO] Starting Minequery server on
    2011-07-04 02:25:10 [INFO] [MCStats] Loading MCStats
    2011-07-04 02:25:10 [INFO] [MCStats] Restoring player statistics.
    2011-07-04 02:25:10 [INFO] [Permissions] (Yeti) was initialized.
    2011-07-04 02:25:10 [INFO] [Permissions] version [3.1.6] (Yeti) loaded
    2011-07-04 02:25:10 [INFO] Preparing level "world"
    2011-07-04 02:25:10 [INFO] Preparing start region for level 0 (Seed: 4271211713867438223)
    2011-07-04 02:25:11 [INFO] Preparing start region for level 1 (Seed: 3456676170760678356)
    2011-07-04 02:25:11 [INFO] Preparing spawn area: 48%
    2011-07-04 02:25:12 [INFO] AXR: Loading/Scanning Chunks
    2011-07-04 02:25:16 [INFO] repack
    2011-07-04 02:25:26 [INFO] 0/625 chunks loaded
    2011-07-04 02:25:26 [INFO] 512/625 chunks loaded
    2011-07-04 02:25:26 [INFO] AXR: hidden:181095 ores in 625 chunks 0.8842529296875%
    2011-07-04 02:25:26 [INFO] AntiXRay 0.6.10 enabled.
    2011-07-04 02:25:26 [INFO] [AutoMessage] version [1.5] loaded
    2011-07-04 02:25:27 [INFO] Loaded Essentials build 2.4.1 by Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans and Xeology
    2011-07-04 02:25:27 [INFO] [Essentials] Payment method found (iConomy version: 5)
    2011-07-04 02:25:27 [INFO] Loaded EssentialsSpawn build 2.4.1 by Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans and Xeology
    2011-07-04 02:25:27 [INFO] [HeroicDeath] enabled.
    2011-07-04 02:25:29 [INFO] [iConomy] v5.01 (Eruanna) loaded.
    2011-07-04 02:25:29 [INFO] [iConomy] Developed by: [Nijikokun]
    2011-07-04 02:25:29 [INFO] [iConomy] hooked into Permissions.
    2011-07-04 02:25:29 [INFO] [MCStats] Enabling MCStats
    2011-07-04 02:25:29 [INFO] [MCStats] iConomy detected.
    2011-07-04 02:25:29 [INFO] [MCStats] Starting internal web server.
    2011-07-04 02:25:29 [INFO] [MCStats] Server stats available at http://[hostname]:25414/stats/mcstats.xml, mcstats.json, mcstats.js, and mcstats.html
    2011-07-04 02:25:29 [INFO] [MCTelnet] - Starting Up! Version: 1.2.5 by bekvon
    2011-07-04 02:25:29 [INFO] [MCTelnet] - Listening on:
    2011-07-04 02:25:29 [INFO] [MobileAdmin] Loading server stats.
    2011-07-04 02:25:29 [INFO] [MobileAdmin] Loading chat log.
    2011-07-04 02:25:29 [INFO] [MobileAdmin] Loading users.
    2011-07-04 02:25:29 [INFO] [MobileAdmin] Starting server...
    2011-07-04 02:25:29 [INFO] [MobileAdmin] Version 3.0 is enabled!
    2011-07-04 02:25:29 [INFO] [MobileAdmin] Server listening on *:5839
    2011-07-04 02:25:29 [INFO] NSCommand 0.2 enabled.
    2011-07-04 02:25:29 [INFO] [Permissions] SQL Interface enabled!
    2011-07-04 02:25:29 [INFO] [PorteCoulissante] plugin version 1.2.1 by Captain_Chaos enabled
    2011-07-04 02:25:29 [INFO] [Residence] Found Permissions Plugin!
    2011-07-04 02:25:29 [INFO] [Residence] Loaded Residences...
    2011-07-04 02:25:29 [INFO] [Residence] Enabled! Version v2.2 by bekvon
    2011-07-04 02:25:30 [INFO] SpyerAdmin has completed updating the script successfully.
    2011-07-04 02:25:30 [INFO] SpyerAdminCommands module version 1.4 stable, a spying utility for administrators and moderators (CommandBook commands module), is active. Part of the Spyer package by [nickguletskii200]
    2011-07-04 02:25:30 [INFO] Vanilla version 0.1 is enabled!
    2011-07-04 02:25:30 [INFO] [Vouchers] 1.2.2 is enabled!
    2011-07-04 02:25:30 [INFO] [Citizens]: Loaded 0 quests.
    2011-07-04 02:25:30 [INFO] [Citizens]: Permissions enabled.
    2011-07-04 02:25:30 [INFO] [Citizens]: version [1.0.9a] (Odyssey) loaded
    2011-07-04 02:25:30 [INFO] [Citizens]: Payment method found (iConomy version: 5)
    2011-07-04 02:25:30 [INFO] SpyerAdmin module version 1.4 stable, a spying utility for administrators and moderators (main module), is active. Part of the Spyer package by [nickguletskii200]
    2011-07-04 02:25:30 [INFO] [Factions v1.3.2] === INIT START ===
    2011-07-04 02:25:30 [INFO] [Factions v1.3.2] Loading conf from disk
    2011-07-04 02:25:30 [INFO] [Factions v1.3.2] Loading players from disk
    2011-07-04 02:25:30 [INFO] [Factions v1.3.2] Loading factions from disk
    2011-07-04 02:25:30 [INFO] [Factions v1.3.2] Loading board from disk
    2011-07-04 02:25:30 [INFO] [Factions v1.3.2] Found and will use plugin Permissions v3.1.6
    2011-07-04 02:25:30 [INFO] [Factions v1.3.2] === INIT DONE (Took 112ms) ===
    2011-07-04 02:25:30 [INFO] [NoCheat] version [1.07] couldn't find CrafTIRC plugin. Disabling logging to IRC.
    2011-07-04 02:25:30 [INFO] [NoCheat] version [1.07] is enabled with the following checks: moving speedhack flying fastswim
    2011-07-04 02:25:30 [INFO] Done (2.028s)! For help, type "help" or "?"
    2011-07-04 02:25:31 [INFO] [Citizens]: Loaded 0 NPCs.
  9. Offline

    Kevin Forte

    Try deleting the entire data folder and letting it rewrite itself.
  10. +1 for that :p

    Any luck on not proccing on falls that don't kill? :<
  11. Offline

    Kevin Forte

    Made it so it goes much earlier in the day and night for time Vouchers now (next update) xP and what plugin do you use to cancel the damage in the first place?
  12. WorldGuard, fall-damage = off.
  13. Offline

    Kevin Forte

    WorldGuard might do what this other plugin does that someone told me about, which is cancel fall damage onPlayerMove as opposed to onEntityDamage. If that is the case, I have NO idea how to fix it ):

    EDIT: I ended up making it so you have to be sneaking for a Resurrect voucher to be used as well. A quick fix, but it'll solve your problem :p

    Updated to 1.3.


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


    I have tried deleting the data folder, updating with the 1.3 version, check file permissions without success. Nothing is ever written to the data files. So when the server is rebooted, signs no longer work and everyone's vouchers are set to 0. The only other person I saw that had this same problem was also using Brohoster to run their server. I don't have any mods that effect signs so I am becoming suspicious that it is the host.
  15. Offline


    Having some serious issues here. Updated to 1.3 and updated my permissions and everything, yet nothing is working. Every command, player interaction, etc fails to execute. The vcheck command creates an "internal error" and all voucher related things create large error messages on the consol.

    13:52:57 [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(
    13:53:05 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'vcheck' in plugin Vouchers v1.3
            at org.bukkit.command.PluginCommand.execute(
            at org.bukkit.command.SimpleCommandMap.dispatch(
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(
            at net.minecraft.server.NetServerHandler.handleCommand(
            at net.minecraft.server.NetServerHandler.a(
            at net.minecraft.server.Packet3Chat.a(
            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(
    Caused by: java.lang.NullPointerException
            at kforte318.Vouchers.Vouchers.onCommand(
            at org.bukkit.command.PluginCommand.execute(
            ... 12 more
    Using build 953
  16. Ehh, with these new permission nodes, you have made it so everyone can use Voucher shops, if I read it correctly, that is actually a step back. Can you add a node again that determines being able to buy Vouchers from the shops?
  17. Offline


    I keep having a problem with null pointers. I have Citizens installed and everytime one takes damage i get spammed with errors.
    11:18:40 [SEVERE] Could not pass event ENTITY_DAMAGE to Vouchers
            at kforte318.Vouchers.VouchEL.onEntityDamage(
            at org.bukkit.plugin.RegisteredListener.callEvent(
            at org.bukkit.plugin.SimplePluginManager.callEvent(
            at net.minecraft.server.Entity.burn(
            at net.minecraft.server.Entity.move(
            at net.minecraft.server.EntityLiving.a(
            at net.minecraft.server.EntityHuman.a(
            at com.citizens.Resources.NPClib.CraftNPC.applyGravity(
            at com.citizens.Resources.NPClib.Creatures.CreatureNPC.doTick(
            at com.citizens.Resources.NPClib.Creatures.EvilCreatureNPC.doTick(
            at com.citizens.CreatureTask$
            at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(
            at net.minecraft.server.MinecraftServer.h(
    Is it possible to do some form of a check to see if citizens is installed and do a check of if the entity is a player or NPC?
  18. Offline

    Kevin Forte

    Bah hell, sorry guys. This is what I get for releasing without testing. @Joy Yes, I can re-add that node.
  19. Offline


    Vouchers after reboot not save

    averad or atov, Can I have a list of your plugins ?

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


    Sorry about continuing to post about my issue, I just really want to put vouchers on my system.

    I removed all other plugins last night and Vouchers still wouldn't save to the data files. No errors have been reported in the log. When I make a sign it works and players can buy from the sign. When they use a voucher it reports that have used the voucher but they can still use it and it continues to appear as available using /vcheck.

    So here is a rundown of the corrections I have tried:

    Reloaded jar
    Deleted Vouchers directory and allowed reload
    Removed all other plugins
    Replaced Voucher signs multiple times

    Should the system be generating an error if it can't write to the data files?
  21. Offline


    my problem is when I restart my server my voucher no longer work.
  22. Offline


    I have the same problem DreK.
  23. Offline


    Is there an option so I can make it so players rent the abilities? So for example they could buy godmode for 2 hours or something?
  24. Offline


    Sorry. Not trying to drive you crazy. Just would like to use this plugin on my server so I am trying to give you as much information as possible to possibly track down my problem. If/when you put the code out I would be happy to fork and help you any way I can.

    I have trying to run different tests to isolate the problem. Here is the sequence of events and the status of things as I went along.

    Downloaded latest jar file
    Placed in plugins folder
    restarted server
    Vouchers folder created with txt files inside but all empty
    created Timeshift sign
    Checked txt changes, still empty
    purchased Timeshift ability..worked
    Used Timeshift ability...worked
    Reported that I had 0 uses left
    typed /vcheck..said I still had 1 use left
    Checked data change still empty
    added Home:gohome to commands.txt
    reloaded plugins
    created Home sign
    checked data files. Now there is data in files:


    ........... vouchers.txt (me and 1 other person on server)
    drspinbag Protection:0
    Tovex Protection:0
    drspinbag Parachute:0
    Tovex Parachute:0

    Purchased 2 more Timeshifts
    Checked data file....still same as above; no change

    *Please let me know if there is any other information I can provide
  25. Any chance for a fixed 1.3 :D
  26. Offline


    Could you add support for 0,50 and the likes ? would be nice, thanks =)

    Also fixing the problems with sign saving and voucher amount saving.
    On server restart everyone got 0 vouchers and the signs are not working ;(
    DreK likes this.
  27. Offline


    I'm having problems similar to the people above. My voucher signs work perfectly and the normal voucher amounts save correctly as well. However, the problem is that my custom vouchers aren't saving after my server reboots or I reload the config.

    After trying to figure out the problem, I found out that the custom vouchers do in fact save in vouchers.txt after reboots. The real problem is that the custom vouchers amounts aren't loading, and so the amount we have in-game defaults to zero.

    I hope what I've mentioned above would help solve the problem. Oh and thanks for fixing the custom command problem I mentioned in my last post.
  28. Offline


    inactive ?
  29. Offline


    essenstialseco support please ;P
  30. Offline


    Could you add a flag or something which when set doesnt allowe timeshift ?
    (want to use other night depending plugins)
    Also it would be nice if it wouldnt be possible to change the time over and over again a 3minute cooldown or something might be good!

    also as it seems this dev is inactive maybe someone wants to take over ? :<
  31. Offline


    I hope

Share This Page