[INACTIVE][MECH] StarterKit v0.4a - Give all Players that join some defined items. [953]

Discussion in 'Inactive/Unsupported Plugins' started by Thomas Bucher, May 17, 2011.

  1. Offline

    Thomas Bucher

    StarterKit - Give all new Player (not seen before by the Plugin) some Starter Items

    Version: v0.4a

    You can Configure what kind of Items a never before seen player get if it Joins you server. There is also a get Items after Respawn mode.

    Features:
    • Give a starterkit to a Player
    • No command needed,it just gets it on Join
    • Config for delay to give the Kit
    • Commands ingame for OPs
    • Respawn Mode Added
    • MultiInventory support on Multiworlds
    Download The Plugin 0.4a
    Download The Plugin 0.4
    Download The Plugin 0.3
    Download The Plugin 0.2a
    Download The Plugin 0.2
    Download The Plugin 0.1c
    Download The Plugin 0.1b
    Download The Plugin 0.1
    Source Code is in the Jar

    Config the Items:
    Code:
    message: You got some Goodies, to start on this Server
    debug: false
    starterkit:
     - <itemid>,<quanitity>
     - <itemid2>,<quanitity2>
    delay: 10000
    onrespawn:false
    usemultiinv: false
    worlds:
    - normal
    - nether
    
    It has some Defaults built in.

    To start over, delete the playerlist.data file from the plugin/StarterKit directory.

    Ingame Commands: (OP only) -> Not for Respawn Mode
    • /starterkit import <importdir>
      Example: /starterkit import world/players
      Imports all players onto the List from the given Dir
    • /starterkit add <playername>
      Example /starterkit add ToasterKTN
      Adds that Playername to the List (Case Sensitive)
    • /starterkit del <playername>
      Example /starterkit del ToasterKTN
      Removes that player from the List
    • /starterkit search <searchstring>
      Example /starterkit search aster
      Lists all Player on the List with aster in the name
    • /starterkit list
      Lists all Player that are on the List
    • /starterkit clear
      Clear the whole list. No more players will be on the List.
    Todos / Ideas:
    • Check Inventory if it is empty before give items.
    • Add Colors to the Message
    • Add Datavalues to the Itemlists
    • Multiline Messages
    Changelog:
    Version 0.4a
    • Import assumes player has been on all Worlds listen in worlds, if
      Multiinv has been enabled.
    Version 0.4
    • Added MultiInv/MultiVerse support.
      Enable usemultiinv
      set the Worlds you wanna get the Kits in worlds:
    • Note: With multiinv support, players in the List are world|playername
      see /starterkit list
      for examples.
    Version 0.3
    • Added a Respawn mode ( onrespawn: true ) in the config file.
    Version 0.2a
    • Added Dup Check on the List itself, to make sure no player gets on the List twice.
    Version 0.2
    • Added ingame Commands for OPs
    Version 0.1c
    • Added Configvariable delay <- delay before give the kit in miliseconds.
    Version 0.1b
    • Add the Items after a 10 Second Delay..
    Version 0.1
    • First Release
    [​IMG]
     
    Taranis01 likes this.
  2. Offline

    40540057

    multiverse / multiinv support please! see earlier post
     
  3. Offline

    OrzecH

    Do you can perform a supplement so you can determine the time of receipt of the equipment?
     
  4. Offline

    Thomas Bucher

    Version 0.1c has a Config var to config the Delay.

    Sincerely Thomas

    To make even you happy, i gonna add an import command, with that you will be able to do something like
    /starterkit import /your/funny/worlddirectory
    And that will import the Names into the List.

    Hope this helps.

    Sincerely Thomas

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

    Sparky20

    Nice plugin.

    I have 2 Suggestions.

    1. Could you please make a command for clearing the player list?
    2. Could you please make a version that gives the kit whenever you re-spawn?
     
  6. Offline

    Thomas Bucher

    1.) is allready done. Check Version 0.2
    2.) I added that on my Todo list
     
  7. I found two issues while using that import command, it doesn't work from the server console, it prints back the usage and it doesn't check if players are already in the list before adding them, I was twice in the list because I had to enter the game to type the cmd :}

    EDIT: actually, none of the sub commands work in server console.
     
  8. Offline

    Thomas Bucher

    Its not designed to work on the Console. Its designed to give output to a player.
    There is actualy a dup check in the Code. and i Wonder where your second comes from.
    Was the Name written in the same Case?

    Sincerely Thomas

    EDIT: Maybe you got the stuff after you run the import, then you will be twice in..
    If you run the command after you have get the stuff, it should be fine.. i tested it twice..

    EDIT2: I made a new Version 0.2a, which directly Checks on the Add to the List, there is no Dup.

    Check Version 0.3
    Added onrespawn in the Config.
    Set this to true to fill your players inv on every respawn.

    Sincerely Thomas

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

    4LT

    [v. 0.3]
    It displays the message twice, and sometimes I get duplicates of the items I listed. StarterKit.yml:
    Code:
    message: ''
    onrespawn: false
    starterkit:
    - 262,40
    - 261,1
    - 319,2
    delay: 1
    debug: false
    Also, items exceed the max stack size for their types (I can give myself a stack of 2 pork chops for example). I was actually working on a similar plugin, and came up with the following function:

    Code:
    private void addItems(PlayerInventory inv, Material m, int count)
    {
        int max = m.getMaxStackSize();
        int fullStacks = count/max;
        int remainder = count%max;
        for (int i = 0; i < fullStacks; i++)
            inv.addItem(new ItemStack(m, max));
        inv.addItem(new ItemStack(m, remainder));
    }
     
  10. Offline

    Thomas Bucher

    0.4 Added Multiworld / MultiInv
    Fixed Problem with 2 Calls
    Inv should allways be clear, if this is called so no need to check for that.
     
  11. Well, I already said... my nick was doubled, I had to enter the game to run the commands, obviously the plugin added me to the list, then I imported players and I was listed twice in /starterkit list.

    Anyway, it's fixed now :}

    Still, why not support console commands too ?
     
  12. Offline

    Johannes

    Could you please add per-group kits?
    For example, when people join my server first they are all 'guests' without any abilities they shouldn't get any kids when they log on.

    I then add them as a 'user' and want them to get a standard set of gear.

    Also I want my 'mod's to get a standard set of tools whenever they respawn, etc.
     
  13. Offline

    choco_dude

    Is there a way to give more than 2 items because in the list I put Diamond Armour and Tools(except a hoe) and it doesn't work, but when I put 2 items in the list it works flawlessly. Is it meant to be like this? If so, do you plan on adjusting the number of items allowed?
     
  14. Offline

    Thomas Bucher

    There are more than 2 items allowed.
    Post your Config for me to Check it.

    Sincerely Thomas

    There are allready command / permission based kit tools. I dont intend to rewrite that.

    Sincerely Thomas

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

    PhantomGamers

  16. Offline

    choco_dude

    Thanks for your help but I worked out that I wasn't writing it in properly. lol I wasn't looking very well obviously
     
  17. Offline

    Jorrdan

    Nice plugin, too bad it gives .5 second lag.
     
  18. Offline

    Thomas Bucher

    When do you have some lag?
    At the Stuff is Threaded, and i see no lag at all..
    You get some Errors? When do you have the Lags?
    Need more Infos.

    Sincerely Thomas
     
  19. Offline

    RicardoXXL

    Where exactly do I configure the items? In the config file there's only starterkit.yml which includes

    Code:
    message: You got some Goodies, to start on this Server
    onrespawn: false
    delay: 10000
    debug: false
    usemultiinv: false
    I do get basic items that aren't listed in the config
     
  20. Offline

    Thomas Bucher

    See Post #1 Config part
    starterkit:
    - <itemid>,<quanitity>
    - <itemid2>,<quanitity2>
    or Post #43 with a working config. That gives those 3 items.

    Sincerely Thomas
     
  21. Offline

    RicardoXXL

    Thanks but, whenever I type a /starterkit command like "/starterkit del RicardoForce" it just shows me the command again with all the possibillities. Am I doing something wrong?
     
  22. Offline

    Thomas Bucher

    Are you Op?
    You need op for all commands to work.
    Note: Commands not work on Serverconsole.

    Sincerely Thomas
     
  23. Offline

    RicardoXXL

    Yes, I'm an admin and I have full permissions, I tried it ingame as well as the console
     
  24. Offline

    Thomas Bucher

    Are there some Errors ?
    Can you post the Config you use.

    Sincerely Thomas
     
  25. Offline

    40540057

    can you add a check to make sure the inventory is empty before you give the kit?
     
  26. Offline

    Thomas Bucher

    I add that to my Todo List.
     
  27. Offline

    IownYourFinger

  28. Offline

    Ninchia

    I'm sorry I feel like an idiot... I don't know what I'm doing wrong but when I log on I don't get the starterkit items and everytime I type /starterkit add aobfoawfwa (thats not a name its an example) it just shows up the list of commands I can use... but it won't let me use them... I'm OP and Owner so I have no idea what the problem is.
    This is how my config is:

    message: Welcome, we've provided a basic kit, use /xl to see your level. Items can be bought or sold by left clicking the item on a sign.
    debug: false
    starterkit:
    - 302,1
    - 303,1
    - 304,1
    - 305,1
    - 267,1
    - 261,1
    - 262,64
    - 257,1
    - 266,15
    delay: 5000
    onrespawn:false
    usemultiinv: false
    worlds:
    - normal
    - nether

    Do I have to manually register peoples names when they log into my server? If so can you make an option to having people automatically registered? Thanks.
     
  29. Offline

    Taranis01

    @Thomas Bucher

    just asking if there will be an update to 818/860 ?
     
  30. LOVE IT!! Easy and it works! Quick questions. Does it support colors? If it did it would be even better. I have all "server" msgs in one color to make them stand out..

    Thanks again..
     
  31. Offline

    MEC666

    lots of errors in console with this plugin

    Code:
    14.06 12:25:48 [Server] INFO [StarterKit] Disabled
    14.06 12:25:48 [Server] SEVERE     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    14.06 12:25:48 [Server] SEVERE     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:341)
    14.06 12:25:48 [Server] SEVERE     at net.minecraft.server.MinecraftServer.stop(MinecraftServer.java:260)
    14.06 12:25:48 [Server] SEVERE     at org.bukkit.craftbukkit.CraftServer.disablePlugins(CraftServer.java:123)
    14.06 12:25:48 [Server] SEVERE     at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:262)
    14.06 12:25:48 [Server] SEVERE     at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:269)
    14.06 12:25:48 [Server] SEVERE     at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:771)
    14.06 12:25:48 [Server] SEVERE     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
    14.06 12:25:48 [Server] SEVERE     at com.bukkit.toasterktn.StarterKit.StarterKit.onDisable(StarterKit.java:18)
    14.06 12:25:48 [Server] SEVERE     at com.bukkit.toasterktn.StarterKit.PlayerList.WritePlayerList(PlayerList.java:30)
    14.06 12:25:48 [Server] SEVERE     at java.io.FileOutputStream.<init>(FileOutputStream.java:160)
    14.06 12:25:48 [Server] SEVERE     at java.io.FileOutputStream.<init>(FileOutputStream.java:209)
    14.06 12:25:48 [Server] SEVERE     at java.io.FileOutputStream.open(Native Method)
    14.06 12:25:48 [Server] SEVERE java.io.FileNotFoundException: plugins/StarterKit/playerlist.data (No such file or directory)
     

Share This Page