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.

    EXAMPLE:
    [​IMG]

    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:
    Code:
    Hooked Commands:
        MoneyCheck:
            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.

    Commands:
    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!

    To-Do:
    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.

    Permissions:
    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
    • Vouchers.free.(type in all lowercase) ~ Allows a player to use a Voucher command without needing the actual voucher.
    • Vouchers.buy ~ 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.

    Changelog:
    v2.2.1
    • Quick Bug Fix.
    v2.2
    • 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

    v2.1.1
    • Plugin will disable itself if an economy plugin is not found.
    v2.1
    • Thunderpunch Voucher added.
    • Voucher descriptions added.
    • /vhelp [voucher type/sign] command added.
    • Bug fix.
    v2.0.2
    • MAJOR Bug Fix. Consider this the recommended build of Vouchers.
    v2.0.1
    • 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.
    v2.0
    • 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.
    v1.5.1
    • Fixed more potential NPEs. Damn things always sneak up on me.
    v1.5
    • All data is now handled with the config.yml in the plugins/Vouchers folder.
    • 'Vouchers.world' permission removed due to redundancy.
    • 'Vouchers.free.[type]' re-added.
    • 'Vouchers.buy' permission added.
    • NPE problem REALLY solved. Seriously.
    v1.4.4
    • NPE problem (when using command vouchers) Finally solved.
    v1.4.3
    • All players are now notified when one uses a Timeshift voucher.
    • Command aliases have been added.
    v1.4.2
    • 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.
    v1.4.1
    • Vouchers.world 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.
    v1.4

    • Removed the Vouchers.free.(type) 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.
    v1.3

    • Times that /vtime sets the world to changed for longer days/nights.
    • PERMISSION NODES CHANGED: BE SURE TO UPDATE YOUR WORLD.YML
    • Players must be holding shift (sneaking) for a Resurrect voucher to be used.
    • (Hopefully) Fixed the issue with command voucher arguments.
    v1.2.2

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

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

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

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

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

    Kevin Forte

    Try deleting your /plugins/Vouchers folder and letting it recreate itself.

    It does, I have been running it on 1060 on my own server to confirm.

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

    Terminator009

    Thanks, Ill get it updated (was away on holiday) Also the Superpick problem was caused by the plugin "Tent" so no issues there either! :)

    OK added my :

    Code:
    TPPlayer:
      Starting Amount for New Players:0
      Include Arguments: true
      Command: 'tphere'
      Description: 'test'
      Alias: 'vtpp'
      Warm-up Time: 0
      Cool-Down Time: 0
    Sign is set up as :
    Code:
    [Vouchers]
    TPPlayer
    100
    /vtpp
    Still not working, what it does let me do :
    Set up the sign
    Buy the voucher
    type /vtpp and get a response from the game stating "/tphere [player]"

    It doesnt let me :
    /vtpp [playername] - Unkown Console Command. Type help.....

    No errors in the log or console other than the unknown command.

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

    Kevin Forte

    It might be conflicting with something if you're getting the /thpere player deal.
     
  5. Offline

    ShanyBoy92

    It seems to be trying to load itself before my economy plugin (BOSEconomy)... Is there anyway I can fix that?
    2011-08-19 14:16:34 [INFO] [Vouchers] No economy plugin found...
    2011-08-19 14:16:34 [INFO] [Vouchers] 2.1.1 is disabled.
    2011-08-19 14:16:34 [INFO] War> War v1.6 (de Gaulle) PREVIEW 4 is on.
    2011-08-19 14:16:34 [INFO] BOSEconomy: Located Permissions 3.1.6.
    2011-08-19 14:16:34 [INFO] BOSEconomy v0.7.2 enabled.
     
  6. Offline

    Terminator009

    What could be conflicting? The Alias (/vtpp) must be hooked for the command for it to show the tphere help when you dont add a player name?

    Is there a seperate permission maybe?

    I know tphere works as i use it all the time....confused....
     
  7. Offline

    Asheu

    Is there any way to disable the message 'You don't have permission to use your vouchers here!'? The server that I run has a plugin that disables fall damage so we do not need the fall damage voucher. Yet when players fall they constantly recieve that message.

    Thanks
     
  8. Offline

    Draconos

    Hey im loving this plugins but i have a problem now i know it prob just me being stupid but ive set up all the permissions as you said and it works fine to me (admin) but when any of my players try to use a voucher they have got it just gives them an error message saying 'You do not have permission to use your vouchers here!'
    please help :) thanks
     
  9. Offline

    Kevin Forte

    Not currently, I'm sorry /: I can fix that.

    That is Very confusing, I honestly have no idea...
    This might be something with the new permissions, I'm not sure, I would ask around on #bukkit on IRC considering I'm Not familiar at all with BukkitPerms
     
  10. Offline

    cennyr

    I am having trouble setting up a Voucher sign for the /home command. I have tried deleting the Vouchers folder from the server and letting it recreate itself, but no luck yet. Here is my config.yml file:

    Code:
    Voucher Settings:
        Sunshine:
            Starting Amount for New Players: 0
            Description: ''
            Warm-Up Time: 0
            Cool-Down Time: 0
        Resurrect:
            Starting Amount for New Players: 0
            Description: ''
            Sneak to Use: true
        Thunderpunch:
            Starting Amount for New Players: 0
            Description: ''
            Allow PvP: false
        Parachute:
            Starting Amount for New Players: 0
            Description: ''
            Sneak to Use: true
        Protection:
            Starting Amount for New Players: 0
            Description: ''
            Maximum Protected Blocks: 200
        Teleport:
            Starting Amount for New Players: 0
            To-Player Teleport Allowed: true
            Description: ''
            To-Coordinate Teleport Allowed: true
            Warm-Up Time: 0
            Cool-Down Time: 0
        Superpick:
            Starting Amount for New Players: 0
            Description: ''
            Restricted Block Values: '7:49'
        Heal:
            Starting Amount for New Players: 0
            Description: ''
            Warm-Up Time: 0
            Allow Healing Other Players: false
            Cool-Down Time: 0
        Timeshift:
            Starting Amount for New Players: 0
            Description: ''
            Night Time Value: 18000
            Warm-Up Time: 0
            Day Time Value: 6000
            Cool-Down Time: 0
    Shop Locations:
        '3': world:15:66:32
        '2': world:16:66:32
        '1': world:19:66:34
        '4': world:12:66:37
    Saved Vouchers:
        Twice77:
            Sunshine: 0
            Resurrect: 0
            Thunderpunch: 0
            Parachute: 0
            Protection: 0
            Teleport: 0
            Superpick: 0
            Heal: 0
            Timeshift: 0
        cennyr:
            Sunshine: 0
            Resurrect: 0
            Thunderpunch: 0
            Parachute: 0
            Protection: 0
            Teleport: 0
            Superpick: 0
            Heal: 0
            Timeshift: 0
    Hooked Commands:
        Home:
            Starting Amount for New Players: 0
            Include Arguments: true
            Command: 'home'
            Description: 'teleport to your home location'
            Alias: 'crib'
            Warm-Up Time: 0
            Cool-Down Time: 0
    Protected Block Locations: ''
    Any suggestions on how to get it to work?
     
  11. Offline

    m00t

    This plugin is a really good idea, I am a server owner and I have been looking for a way to give the people in my server specific special abilities :)

    I haven't yet installed the plugin, because I want to know if there is a way to give the vouchers to players instead of them purchasing them, because I want to give them as a reward for building a cool building etc. Are the vouchers actual items? Becaue if so, I could use the /give command along with the item ID's (If you would be so kind as to post them) to give vouchers to players. If not, is there any other way that it can be done/implemented into the plugin?

    Thanks :D
     
  12. Offline

    Kevin Forte

    Try removing the 's around the command, description, and alias

    I haven't done this yet, but I can!

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

    m00t

    Thankyou :')
     
  14. Latest version still not loading:

    Code:
    10:21:06 [SEVERE] Error occurred while enabling Vouchers v2.1.1 (Is it up to date?): null
    java.lang.NullPointerException
            at kforte318.Vouchers.Vouchers.loadHookedCommands(Vouchers.java:416)
            at kforte318.Vouchers.Vouchers.onEnable(Vouchers.java:557)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:885)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:278)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:178)
            at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:161)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:286)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:273)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:149)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:337)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  15. Offline

    Kevin Forte

    Updated to v2.2, check the Changelog for a list of updates.

    Update and then try again please?
     
  16. That worked, back to finally testing functionality again tomorrow ;)
     
  17. Offline

    Kevin Forte

    Cool, let me know if you run into issues x)
     
  18. Hmm well I tested on 2 servers, and the plugin is not creating a config file on load.

    Tried creating 2 Vouchers signs, nothing happening, not turning into blue text...

    And /vtime throws an error.

    Code:
    14:09:52 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'vtime' in plugin Vouchers v2.2
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:352)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:737)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:701)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:694)
            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:89)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:453)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
            at kforte318.Vouchers.Vouchers.onCommand(Vouchers.java:1113)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    
    And this is in startup log:

    2011-08-28 14:05:45 [INFO] [Vouchers] 2.2 is disabled.
    2011-08-28 14:10:19 [INFO] [Vouchers] Loaded iConomy to handle purchases.

    A bit confusing all really :eek:
     
  19. Offline

    Kevin Forte

    Ah, well ignore that second thing, Vouchers is disabling itself because I am an idiot. Let me fix that.
     
  20. Offline

    Sepulzera

    Latest version isn't working for me. Get the message "No permissions" (thought i'm admin).
    Tested with CB 1060, no plugins (just permissions).

    Old versions are working fine :\
     
  21. Offline

    Kevin Forte

    Which version of Permissions? I am not really savvy with new permissions, so I may or may not be able to help.
     
  22. Offline

    Sepulzera

    PermissionsBukkit and Permissions2.7
    PS: The complete message is:
     
  23. Offline

    Kevin Forte

    Hmm, let me do some testing and get back to you.
     
  24. Offline

    patriotdow

    Kewl idea for a plugin but I have some problems.

    1st command hooks don't seem to work

    Hooked Commands:
    Spawn:
    Starting Amount for New Players: 0
    Include Arguments: false
    Command: spawn
    Alias:
    Warm-Up Time: 0
    Cool-Down Time: 0
    Description: Warp to spawn point.

    Is what my config looks like but when I create a sign that looks like this

    [Vouchers]
    Spawn
    150
    /spawn

    It indicates that "Voucher type not found!"

    Also do permissions for command vouchers work the same way?

    e.g.

    Vouchers.use.spawn ???

    Also, /vgive doesn't seem to work either - when I give myself Heal vouches it says I got 5 but /vcheck shows 0.

    Buying them seems to work fine.


    Intermittent errors with commands like /vheal


    Corresponding log

    Code:
    org.bukkit.command.CommandException: Unhandled exception executing command 'vheal' in plugin Vouchers v2.2.1
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:352)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:737)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:701)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:694)
        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:89)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
        at kforte318.Vouchers.Vouchers.onCommand(Vouchers.java:1007)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
    
     
  25. Offline

    amunro

    Exact same issue here.

    Im using groupmanager which is based off permissions 2.x
     
  26. Offline

    Hajimoto

    Need help to correct a somewhat annoying issue. Whenever I shut the server down and restart the server, all my users state that they have 0 (zero) vouchers when they log back in. I check the config.yml and the user name and voucher counts are listed with non zero entries. Entries that properly reflect the users, pre-restart, amounts.

    Questions:
    1. Is there another voucher count location that the /vcheck is looking at other than config.yml?
    2. Am I doing something out of sequence that is causing this issue?
     
  27. Offline

    Ralm

    Same to me. Using PremissionsEX, Im OP and Admin with "*" permissions and doesnt let me do anything.

    @Kevin Forte

    Hi,
    will you add compatibility to other permissions systems other then SuperPerms???

    Thanks

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

    Kevin Forte

    I'm not exactly sure how to work with SuperPerms, so I may simply switch it back to using Permissions considering it seemed to work fine that way. Next update.
     
  29. Offline

    Ralm

    Why you dont try get compatibility with both???

    Anyway, waiting for the new update so I can try out your plugin =) Thanks a lot.
     
  30. Offline

    amunro

    Superperms are really easy. Its all built into the bukkit api now, so you just do:
    Code:
    if (sender.hasPermission("pvptables.rank.self")) {
    and add the imports.
     
  31. Offline

    Ralm

    Even so he needs to leave compatibility to the old perms, because most of us just dont want to use the crapy SuperPerms.

    Anyway, Kevin are you waiting for 1.8 to came out to release the new version with the normal permissions support??

    Im just anxious to try out your plugin. I have some ideias on how to use it, and I think it will give SUCH a dynamism on the server.

    Thanks
     

Share This Page