[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


    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.

    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)

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

    Show a list of available kits:
    Get a named kit (example):
    /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:
    # 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

    • '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!)
            - 'kit.kit'
            - 'kit.reload'
            - 'kit.proxy'
            - 'kit.starterkit'
            - 'kit.tools'
            - 'kit.*'
    I'm a Java newbie, please be gentle.
    Thank you :)
  2. Offline


    Tools;277 1;278 1;279 1;293 1; -60000
    Remove the space between ; and -60000, then try again please. You'll just have to excuse my poor error-checking code :)
  3. Offline


    it doesn't work. When I type /kits I see nothing and when I try to get a kit it does nothing, too.

    My permissions:

    system: default

    default: true
    build: false
    - 'general.spawn'
    - 'mywarp.warp'
    default: false
    build: true
    - Default
    - 'kit.kit'
    - 'kit.*'
    - 'myhome.home.*'

    default: false
    build: true
    - Builder
    - 'general.*'

    default: false
    build: true
    - Moderator
    - 'mywarp.*'
    - '*'


    group: Admins
    - '*'
    - 'kit.kit'
    - 'kit.cobblestone'

    group: Admins
    - '*'
    group: Admins
    - '*'

    ----------- and my kits.txt
    # Name;ID Amount;ID Amount;ID amount (etc)[;-cooldown]
    Starterkit;276 1;277 1;278 1;279 1;293 1
    Stone;1 64
    Cobblestone;4 64
    Wood;5 64
    Torch;50 64
    Glass;20 64
    Iron;265 64
    Gold;266 64
    Diamant;264 10; -6000
    Coal;263 64
    please help me! thanks!
    --- merged: Jan 28, 2011 11:36 PM ---
    ahh ok... only in default group I can use kits, but i wanna use /kit in admin group, too. where is the problem?
  4. Offline


    This isn't an issue with KitPlugin; either add the permissions to the Admins group as well, or use inheritance.
  5. Offline


    the server says it cant find the plugins/KitPlugin/kits.txt i know its because of the fact that my comp won't let me put in / on a txt doc... Help!

    [edit: plz post a working kits txt doc]
  6. Offline


    Go to your "plugins" directory, create a new directory "KitPlugin" and go into it. Now create a file called "kits.txt" and use the example in the OP as a starting point.
  7. Offline


    you da man floyd, thanks for all the help. I cant check it right now im at my gfs, but ill check it tomorrow and let you know if it worked! thanks again
  8. Offline


    2011-01-29 20:07:41 [INFO] Starting minecraft server version Beta 1.2_01
    2011-01-29 20:07:41 [INFO] Loading properties
    2011-01-29 20:07:41 [INFO] Starting Minecraft server on *:25565
    2011-01-29 20:07:42 [INFO] Preparing level "world 2"
    2011-01-29 20:07:42 [INFO] Preparing start region
    Preparing spawn area: 12%
    Preparing spawn area: 24%
    Preparing spawn area: 28%
    Preparing spawn area: 44%
    Preparing spawn area: 52%
    Preparing spawn area: 61%
    Preparing spawn area: 77%
    Preparing spawn area: 97%
    2011-01-29 20:07:50 [INFO] [General] version [2.1] (Salvez) loaded
    2011-01-29 20:07:51 [INFO] [Permissions] version [1.9] (Handler) loaded
    2011-01-29 20:07:51 [INFO] Loaded Essentials b129 by Zenexer, ementalo, Eris, an
    d EggRoll
    java.io.FileNotFoundException: plugins\KitPlugin\kits.txt (The system cannot fin
    d the path specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileReader.<init>(Unknown Source)
    at com.bukkit.floyd.kit.KitPlugin.onEnable(KitPlugin.java:56)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:135)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:61)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:42)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:153)
    at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:140)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:104)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:181)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
    KitPlugin version 1.03 is enabled!
    2011-01-29 20:07:51 [INFO] Done! For help, type "help" or "?"
    my problem is that when i start the minecraft with my essentials plugin, i type /kit and it says available kits:tools. I put this kitplugin java in my plugin folder and put the kits.txt as well? how come the kits wont appear?
  9. Offline


    *bashes head on wall
    srry i'm stupid and didn't figure out the folder part (all the other ones need folders to....)
    good job though :D
  10. Offline


    First of all, the kits.txt file should go in a subfolder called "KitPlugin" as indicated by the error message.

    The confusing bit here is that Essentials offers pretty much the same functionality as KitPlugin so it's up to you which one you want to use. The "kits:tools" message actually comes from the default config in Essentials.

    If you choose KitPlugin over Essentials' "/kit" command you must disable those commands in "plugins/Essentials/config.yml" like so:
    - kit
    But you may want to just ditch KitPlugin and go with Essentials to keep the server setup simple.
  11. Offline


  12. Offline


    Somehow /kit tools and /kit opening work ,but /kit paints and /kit test don't. Help? (again)

    [edit: i think it might be because it doesn't recognize the dyes their # id's are 351:1, 351:2, 351:3 ect... is this right?]

    Attached Files:

    • kits.txt
      File size:
      248 bytes
  13. Offline


    worked great floyd, thanks for the help. that space was all that stood between me and kits :)
  14. Offline


    I can't really say, the plugin itself makes no attempt to check the item IDs but simply pass them to the objectstack constructor. Do you see any exceptions or other errors on the server console, or does it just fail quietly?
  15. Offline


    is it possible to bind iconomy to this p[lugin?
  16. Offline


    The thought had occurred to me but I don't use iconomy myself. If anyone has any insight on how to integrate with iconomy and would volunteer as a tester, maybe we could change all that? :-D
  17. Offline


    how do i use kits in essentials and not this plugin? where do i put my kits and etc? do i put it in config and if so how?
  18. Offline


    Strictly speaking this is off-topic for this thread but it wouldn't surprise me if you'll find Essentials' config in "Essentials/config.yml" ;-)
  19. Offline


    I'm getting the following error while trying to use any kit:

    Feb 3, 2011 6:59:01 PM org.bukkit.plugin.SimplePluginManager callEvent
    SEVERE: Could not pass event PLAYER_COMMAND to KitPlugin
    2011-02-03 18:59:01 [INFO] JoeHazzers tried command: kit basic
    here is my kits.txt (plugins/KitPlugin/kits.txt)
    # Name;ID Amount;ID Amount;ID amount (etc)[;-cooldown]
    Tools;276 64;277 64;278 64;279 64
    Basic;268 1;269 1;270 1;271 1
  20. Offline


    need some help, when i install the plugin its alls fine, i believe i installed it right anyway.

    So, as i open up my server to start it appears "KitPlugin" not available even though i installed it to permissions which is the reason it gives for it not working, Help?
  21. Offline


    v1.03 is getting ancient, lots of things have changed. I have just rebuilt using the latest Bukkit and uploaded v1.04, please try that before proceeding.

    @JoeHazzers: If you still get this error after updating to v1.04 and restarting craftbukkit, let me know.

    @zzDeadlyGoose: Is the Permissions plugin loaded before or after KitPlugin? I really have no idea how to affect the load order so I'll have to do some research. Maybe I can detect it later on like WorldEdit and WordGuard do.
  22. Offline


    okay thank you and the permissions is loaded first i shall try to send you the source code aswell

    plugin:name: KitPlugin main: Kitplugin.com.bukkit.floyd.kit.KitPlugin version: 1.03
  23. Offline


    Fixed now. Update worked.
  24. Offline


    v1.05 fixes a stupid bug; if you added a cooldown timer and then removed it later, the plugin would get confused.
  25. Offline


    Wonderful plugin. I give my users free Diamond Tools, and it was getting tiresome to give them out over and over every time one went swimming in molten rock.

    Thanks much~
  26. Offline


    Hello, I'm having a hard time setting up the KitPlugin. I've read pretty much every post a few times to see if anyone would be able to answer my question but all my attempts were unsuccessful. Basically I've downloaded the KitPlugin 1.04 and installed as instructed. Then I installed Permissions plugin. I essentially copied the permissions from what th3saget was using (with different users of course) and just for testing purposes I copied the same kits from the initial post just to see if it would work.

    When in game I am able to type /kit and I get the message "The following kits are available / You don't have access to any kits". I also don't get any messages on my console at this point. I should have kits as I created the "MineCraft\plugins\KitPlugin" folder with "kits.txt" in it.

    When I go ahead and type the name of a kit I have anyway I get the following message:
    [Kit] Error reading plugins\KitPlugin\kits-zoah.txt (the system cannot find the file specified), this is harmless

    As an attempt I also created a kits-zoah.txt file with much of the same kits and I still get the problem. Any suggestions?
  27. Offline


    I would check the permissions yet again. Remember that you need access to not only the /kit command but to each kit as well.

    The file "kits-zoah.txt" is used to store information about kits dispensed to the player named "zoah", it is perfectly normal for this file to not exist and if you created it manually then simply delete it. The plugin will create one such file for every player in order to enforce cooldowns. As the message says, this is harmless but I think I'll remove this message altogether in the next version so as not to cause any confusion.

    If you still can't get it to work, please consider posting your full Permissions/config.yml and kits.txt so I can try to reproduce the problem.
  28. Offline


    Here is my config.yml, i just turned it into a txt to upload the file.
    The kits.txt is basically a copy of what you posted on the original thread.

    btw, it's very nice of you to take so much time to answer questions and help out folks. Thank you very much.

    Attached Files:

  29. Offline



    Seems to me like you did nothing wrong here so we'll have to keep digging. Can you give me a complete list of plugins you're using?

    There's no point in releasing something if you're not going to take the feedback seriously, right? :)
  30. Offline


    I have KitPlugin, LightVote, MinecartMania Core, Permissions, WarpGate.

    But when I was attempting to install KitPlugin initially I only had WarpGate and Permissions.
  31. Offline


    On CB build 252, my users are saying you only get 1 kit, and the cooldown never burns down. I have it set to -6000, they waited a whole day and it still didn't let them get another one. How long exactly is -6000, what time unit is that?

    Perhaps it's just a bug..

Share This Page