[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. is there anyway you make it so when someone gets promoted to a group they receive a kit automatically? or when they join for first time?
     
  3. Offline

    Xemnas33

    Hmm i'll look into this. Are there any errors at all?

    I'll ask FloydATC about this.
     
  4. Offline

    Tealk

    its possible to set it that a kit can only buy 1 time?
     
  5. Offline

    FloydATC

    Only by using a very high cooldown value
     
  6. Offline

    Lykkepillen

    Any ETA on a testet 766 version?

    Thanks in advance! :)
     
  7. Offline

    Arkian123

    I say ,,/kit [KIT] [PLAYERNAME]", but it doesn't work. What i must do?


    :EDIT:

    I've installed Essentials, and now i recognized it : In "overriden-commands" must be stay "- kit", or "- kits" XD

    Thanks for this very nice Plugin. Ciao
     
  8. Offline

    Xemnas33

    I've built it against #766. The build should be available for download in just over an hour.
     
  9. Offline

    Xemnas33

    Well it has been 2 days since I posted that :p

    Doing a build against #798 soon. Just waiting for the official RB status.

    #798 on the way!
     
  10. Offline

    hedgomatic

    Ah, apologies, I saw the old bukkit version number in the post title and assumed it hadn't been uploaded. It really is a super handy plugin now that I've finally gotten to playing with it! Thanks :]
     
  11. Offline

    waffulz

    Shoot now 803 is out lol. Hope to see this updated soon, it's the only plugin that doesn't seem to be working even though it says it's hooking just fine.
     
  12. Offline

    Xemnas33

    I've tested this on 803 and it works fine. It might be user error, if you can post what you're doing i'll be able to help.

    Also i'll upload a build built against 803 tonight.
     
  13. Offline

    waffulz

    For some reason kits just aren't showing up when players type /kit. All they see is the default kits from the essentials config, shown here: http://i51.tinypic.com/24b87pv.png (I use essentials, and iConomy 5).

    Here's the startup:
    Code:
    2011-05-23 07:05:54 [INFO] [Kit] plugins/KitPlugin/kits.txt reloaded OK
    2011-05-23 07:05:54 [INFO] [Kit] Permission system detected. Good.
    2011-05-23 07:05:54 [INFO] [Kit] hooked into iConomy.
    2011-05-23 07:05:54 [INFO] KitPlugin version 1.2 is enabled!
    And my kits.txt file:
    Code:
    # Name;ID Amount;ID Amount;ID amount (etc)[;-cooldown][;$price]
    # Normal Kit
    Wood;268 1;269 1;270 1;271 1;-200;$50
    Stone;272 1;273 1;274 1;275 1;-400;$170
    Iron;267 1;256 1;257 1;258 1;-800;$250
    hunt;261 1;262 64;-300;$720
    #Builder Only Kit
    Diamond;277 1;278 1;279 1;-900;$4200
    # pvp kit
    Leatherpvp;272 1;298 1;299 1;300 1;301 1;-300;$250
    Ironpvp;267 1;306 1;307 1;308 1;309 1;-300;$420
    Goldpvp;283 1;314 1;315 1;316 1;317 1;-500;$1780
    Diamondpvp;276 1;310 1;311 1;312 1;313 1;-800;$8900
    # Food
    Cake;354 10;-1000;$10000
    This plugin worked fine prior to updating all of my plugins and CB this evening. This is the only one that isn't working properly. I haven't changed anything in any plugin configs either.
     
  14. Offline

    Xemnas33

    All the startup is working fine. Can you try removing essentials and see if the kits come back?
     
  15. Offline

    FloydATC

    That's your problem right there, you need to let Essentials know that you want another plugin to handle the /kit command. Otherwise, KitPlugin never gets to handle the command because Essentials cancels the event.
     
  16. Offline

    Brvtvs

    By that do you mean contact the developers of Essentials? Also, is there a possibility of an alias to bypass Essentials? I really need this plugin to be able to dispense kits to other players without them having the permission. Thanks.
     
  17. Offline

    waffulz

    By default Essentials is supposed to let other plugins with conflicting commands take priority over theirs unless you set it otherwise in their config. This should not be happening, as it's never been a problem before.
     
  18. Offline

    Brvtvs

    I can confirm that the problem arises when I update from 766 to 803, I am not sure if a future version of Essentials will fix that.
     
  19. Offline

    waffulz

    So I've figured out that after removeing the essentials.kit permission from users, it now says they do not have permissions to access the command /kit. I have the kit.kit permissions as well as kit.kitname for every kit we have. Wonder why this is?
     
  20. Offline

    Xemnas33

    If essentials is meant to give priority to other plugins then I'd suggest you ask on the essentials thread as without essentials KitPlugin works fine.
     
  21. Offline

    waffulz

    Ok it has been acknowledged by them that there's an issue. If anyone else is experiencing this just wait for a new Essentials update.
     
    Bjourk likes this.
  22. Offline

    Xemnas33

    Great! Thanks for clearing that up.
     
  23. Offline

    jonathanyan

    Somehow, I used to be able to use kits, but now I can't in-game (BUT I can on the console...???) and here's what I get:
    Code:
    17:03:15 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'kit' in plugin KitPlugin v1.2
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:97)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:278)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:701)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:666)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:660)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:377)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:292)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.LinkageError: com/nijiko/permissions/PermissionHandler
        at com.floyd.bukkit.kit.KitPlugin.onCommand(KitPlugin.java:123)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
    
    Is there anything wrong?
    P.S. I checked my permissions and I'm an admin
     
  24. Offline

    Xemnas33

    1) What Bukkit build?
    2) What permissions plugin, if any?

    Also that error comes from trying to use kits from the console. Not sure if you're meant to be able to, i'll ask Floyd.

    The plugin works fine on 1.6.4 but unfortunatley as far as I can tell from test we're going to have to do some changing to get the plugin to work with permissions 3.0.6 .
     
  25. Offline

    FloydATC

    Giving out kits from the console should work since v1.12 but I must confess I haven't tested it much

    I agree 100%. The linkage error and a new major version number is a giveaway really :-D
     
  26. Offline

    Xemnas33

    Hm, what linkage error? I just get permission denied.

    Small update to config file, it just adds the example for making a kit cost money to the top line.
    That'll be available tomorrow.
     
  27. Offline

    Xemnas33

    New Build tested on 1.6.6.

    Changelog:
    - Added iConomy option to config example

    KitPlugin v1.2 (Minecraft 1.6.6/Permissions 2.7.x)

    This WON'T work with permissions v3.0.6 and i've chosen to wait untill v3.x is released as permissions seems to be buggy for quite a few people. For now v2.7 works just fine.
     
  28. Offline

    zlt

    Hey there. Any idea why my kit plugin gives people "internal server error" etc when they buy a kit? They get the kit but have to connect again - sort of annoying :p
     
  29. Offline

    Xemnas33

    What's the console error? I've tested my build and it works fine.
     
  30. Offline

    zlt

    Here it is:

    02.06 12:15:05 [Server] INFO at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    02.06 12:15:05 [Server] INFO at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:311)
    02.06 12:15:05 [Server] INFO at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:401)
    02.06 12:15:05 [Server] INFO at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    02.06 12:15:05 [Server] INFO at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    02.06 12:15:05 [Server] INFO at net.minecraft.server.NetworkManager.b(NetworkManager.java:217)
    02.06 12:15:05 [Server] INFO at net.minecraft.server.Packet10Flying.a(SourceFile:126)
    02.06 12:15:05 [Server] INFO at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:286)
    02.06 12:15:05 [Server] INFO at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:176)
    02.06 12:15:05 [Server] INFO at net.minecraft.server.EntityHuman.o_(EntityHuman.java:95)
    02.06 12:15:05 [Server] INFO at net.minecraft.server.EntityLiving.o_(EntityLiving.java:231)
    02.06 12:15:05 [Server] INFO at net.minecraft.server.EntityPlayer.u(EntityPlayer.java:264)
    02.06 12:15:05 [Server] INFO at net.minecraft.server.EntityHuman.u(EntityHuman.java:180)
    02.06 12:15:05 [Server] INFO at net.minecraft.server.InventoryPlayer.f(InventoryPlayer.java:104)
    02.06 12:15:05 [Server] INFO at net.minecraft.server.ItemStack.a(ItemStack.java:199)
    02.06 12:15:05 [Server] INFO java.lang.NullPointerException
    02.06 12:15:05 [Server] WARNING Failed to handle packet: java.lang.NullPointerException
    02.06 12:15:05 [Server] INFO [Kit] Giving a kit to zeelt: torch
    02.06 12:15:05 [Server] INFO [Kit] zeelt requested kit torch
     
  31. Offline

    Xemnas33

    Are you posivite it's KitPlugin? Can you please provide the following information:

    *Bukkit Build:
    *KitPlugin Build(my one above or the one from the OP):
    *Exact steps to reproduce:
    *iConomy version:
    *Plugin list:
    *Entire server log
     

Share This Page