[INACTIVE][MECH] KitPlugin v1.2 - Dispense kits to your players (now w/ iConomy5 support) [600-818]

Discussion in 'Inactive/Unsupported Plugins' started by FloydATC, Jan 19, 2011.

  1. Offline

    FloydATC

    This simple plugin does only one thing: It dispenses kits to players upon request, like in hMod.
    Source is included in the .jar, feel free to do whatever you want with it.

    Changelog:
    v1.00 - Initial release
    v1.01 - Rebuild (fixed onPlayerCommand issue)
    v1.02 - Implemented Permissions
    v1.03 - Rebuild, implemented cooldown timers
    v1.04 - Rebuild
    v1.06 - Changed cooldown code to use SECONDS, please update kits.txt!
    v1.07 - Time until cooldown is shown in a friendly (but inaccurate) way
    v1.08 - Improved error-checking, simplified install, use onCommand, switched namespace.
    v1.09 - Added "/kit reload" to reload the config without a server restart
    v1.10 - Removed the "stupidly long constructor" as per Bukkit team recommendation
    v1.11 - Added support for item data (yes, wool colors!) and durability. Read the thread.
    v1.12 - Added support for giving kits to other players
    v1.13 - Added an informational log message when a player with 'kit.proxy' permission bypasses a cooldown
    v1.14 - Minor changes to the permission checking and logging
    v1.15 - Added optional iConomy support and price tags
    v1.2 - Updated to support iConomy 5.0 (overhaul by Xemnas33)

    Dependencies:
    • Requires the Permission plugin (2.6 or equivalent)
    How to use:

    Show a list of available kits:
    Code:
    /kit
    Get a named kit (example):
    Code:
    /kit starterkit
    How to install:

    1. Download http://minecraft.atc.no/plugins/KitPlugin.jar
    2. Copy it to your "plugins" directory
    3. Create a file calles plugins/KitPlugin/kits.txt
    4. Describe the kits you want to dispense. For example:
    Code:
    # Name;ID Amount;ID Amount;ID amount (etc)[;-cooldown][;$price]
    Starterkit;268 1;269 1;-300
    Rock;1 256
    Wool;35:0 64;35:1 64;35:2 64;35:3 64;35:4 64;35:5 64;35:6 64;35:7 64;35:8 64;35:9 64;35:10 64;35:11 64;35:12 64;35:13 64;35:14 64;35:15 64;-3600
    
    Note that the cooldown is an optional negative integer. -300 means 300 SECONDS (5 minutes)
    ID can be just a numerical id, id:data, id::durability or id:data:durability

    Permissions:
    • 'kit' (or 'kit.kit') required to access the command itself
    • 'kit.reload' required to reload the configuration
    • 'kit.proxy' required to give kits to other players and bypasses any cooldown checks.
    • 'kit.<name of kit>' required to get a specific kit (use lowercase!)
    Example:
    Code:
            - 'kit.kit'
            - 'kit.reload'
            - 'kit.proxy'
            - 'kit.starterkit'
            - 'kit.tools'
            - 'kit.*'
    
    I'm a Java newbie, please be gentle.
    Thank you :)
     
  2. Offline

    Silba93

    20:28:54 [INFO] [Kit] silba93 requested kit canon_kit
    20:28:54 [INFO] [Kit] silba93 can't afford the kit 'canon_kit'

    ---------------
    Thanks!!!!!!
     
  3. Offline

    darthsiddious

    sweet, thanks alot buddy!
     
  4. Offline

    Silba93

    mining_kit;257 2;256 2;50 64;64 30;323 2;-120;$200

    This kit works fine except for it gives me an extra 64 wood doors. Why is it doing that? The id of wood door is 324
     
  5. Offline

    FloydATC

    Both id 64 and 324 refer to wooden doors (presumably in placed vs. entity mode) according to the reference I'm using: http://www.minecraftwiki.net/wiki/Data_values

    I think you'll find that you're getting 30 and not 64 of them if you double-check?
     
  6. Offline

    Captain Kirk

    Do you have to have permissions for this to work?
     
  7. Offline

    FloydATC

    Yes, as stated in the OP.
     
  8. Offline

    gamerluke

    Can't you possibly change it so that;
    If permissions not found then it will switch to "ops.txt" since I don't like using permissions so much, trying to get kits working though :\
     
  9. Offline

    Snowybearr

    This keeps telling me that I don't have permissions, I've tried permissions 2.5, 2.6, and 2.7. Any info on what I'm doing wrong, or is this an issue with this plugin?
     
  10. Offline

    FloydATC

    I have not seen this myself and I suspect that you may have a conflicting plugin installed. Do you perhaps use Essentials?
     
  11. Offline

    Snowybearr

    Eh no, I cant stand Essentials, I hate all these permission things in general, I have very little addons, basicly permissions, worldguard, and logblock. I would LOVE to add this.
     
  12. Offline

    yourock129

    I've downloaded the software and put custom kits but it says that only the starterkit and rock kits are available. why?
     
  13. Offline

    Liam Gibson

    Works perfectly well done, what an amazing addon it is. I rent a build server for me and a few friends and we like to piss about more than we probably should, we die regularly let's just put it at that. Having to type "/give Eltoc xxx xxx" about 20 times after dieing is just so much hassle, just typing "/kit general" and getting it all has practically saved us hours now, and probably days in the future.

    Fantastic mod, probably the most useful I've used in a long time, well done.
     
  14. Offline

    FloydATC

    Late reply, sorry. I can't see any other possibility, there has to be something wrong with the permissions setup... perhaps an illegal char somewhere, like a tab or other indentation problem :-|

    First of all, did you "/kit reload" for the changes to take effect? Second, check the permissions.

    Thanks, but credit where credit is due; it wasn't my idea to begin with. hMod had the same feature ages ago :)
     
  15. Offline

    GmK

    @FloydATC

    Even if it existed during hMod, this is still one of those plugins that somehow doesnt want to break. Luckily! :D KISS to perfection, and I wouldnt even know of additional features :D I wanted to suggest per-group kits, but that can easily done with permissions.
     
  16. Offline

    yourock129

    Alright. thanks but now it says that an internal error has occured while attempting to preform this command. i have the latest on everything and permissions are up to date. do you know why this is happening?
     
  17. Offline

    FloydATC

    Check the console message log. If an error occurred it is most likely due to a typo in kits.txt and you should have a more informative error message or a stack trace somewhere.
     
  18. Offline

    Darq

    I'm looking for a kit plugin with cooldowns for a sort of premium service thing I've set on my server. The problem is, with most kit plugins if the server restarts with a kit's cooldown still going, it resets the cooldown and the player can use the kit again right after. I'd like something that saves the duration even after a restart. Can this be done? More importantly, if it can, would you be willing do to so?
    Thanks,
    Huts
     
  19. Offline

    FloydATC

    @Huts:
    KitPlugin saves the information to disk every time a kit is successfully dispensed (one human-readable text file per player) and uses the operating system time so the cooldowns should always work as expected even after a crash, reload or restart.
     
  20. Offline

    Darq

    Well then, this is an amazing plugin and I am definitely using it. :)
     
  21. Offline

    renxwar

    How about kit categories?
     
  22. Offline

    txtsd

    Doesn't work with iConomy 5.0

    Code:
    22:31:46 [INFO] [Permissions] (Phoenix) was Initialized.
    22:31:47 [INFO] [iConomy] Logging is currently disabled.
    22:31:47 [INFO] [iConomy] v5.0 (Eruanna) loaded.
    22:31:47 [INFO] [iConomy] Developed by: [Nijikokun]
    22:31:47 [INFO] [Kit] plugins/KitPlugin/kits.txt reloaded OK
    22:31:47 [INFO] [Kit] Permission system detected. Good.
    22:31:47 [SEVERE] com/nijiko/coelho/iConomy/iConomy loading KitPlugin v1.15 (Is it up to date?)
    java.lang.NoClassDefFoundError: com/nijiko/coelho/iConomy/iConomy
            at com.floyd.bukkit.kit.KitPlugin.setupIconomy(KitPlugin.java:98)
            at com.floyd.bukkit.kit.KitPlugin.onEnable(KitPlugin.java:68)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:632)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.ClassNotFoundException: com.nijiko.coelho.iConomy.iConomy
            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)
            ... 12 more
     
  23. Offline

    heuvel

    When i type /kit or /kit starterkit no message shows up and i dont get the items. what am i doing wrong?
     
  24. Offline

    Perling

    please update kit , i get the same error like txtsd


    comes a update ?

    Code:
    2011-05-07 08:24:55 [INFO] [Kit] Permission system detected. Good.
    2011-05-07 08:24:55 [SEVERE] com/nijiko/coelho/iConomy/iConomy loading KitPlugin v1.15 (Is it up to date?)
    java.lang.NoClassDefFoundError: com/nijiko/coelho/iConomy/iConomy
        at com.floyd.bukkit.kit.KitPlugin.setupIconomy(KitPlugin.java:98)
        at com.floyd.bukkit.kit.KitPlugin.onEnable(KitPlugin.java:68)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:632)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
        at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:287)
        at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleCommandMap.java:201)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:255)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:677)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:640)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:634)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.ClassNotFoundException: com.nijiko.coelho.iConomy.iConomy
        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)
        ... 21 more
    
     
  25. Offline

    Xemnas33

    iConomy 5.0 support officially released
     
  26. Offline

    Perling

    ok thanks!
     
  27. Offline

    Xemnas33

    No problem, post on here if you have any errors etc.

    I doubt backwards compatibility will even be worth it for iConomy but I guess that depends on if new features are planned to be added.
     
  28. Offline

    FloydATC

    I have not had a chance to test it myself yet as I'm away on a seminar but since this version seems to solve the problem I have uploaded it to the official URL.The version number is 1.2.

    @Xemnas33: A big thank you :)
     
  29. Offline

    clawdz18

    i got it working...but i cant make it charge, it dosent take money can i get and example from anyone

    Ive tried loads of different thing like...
    kit1;256 1;257 1;258 1;-300;$price10
    kit2;256 1;257 1;258 1;-300;$ price 10
    kit3;256 1;257 1;258 1;-300;$ price 10

    they all work none charge tho
     
  30. Offline

    FloydATC

    Try this:
    Code:
    kit1;256 1;257 1;258 1;-300;$10
    
    Basically,
    • a positive integer is an item ID (possibly followed by a count)
    • a negative integer is a cooldown
    • an integer prefixed with '$' is a price
     
  31. Offline

    clawdz18

    kit1;256 1;257 1;258 1;-300;$10
    that still dosent charge..
    it spawns the items w.o taking any money
     

Share This Page