Start item

Discussion in 'Archived: Plugin Requests' started by winter4w, Sep 28, 2013.

  1. Offline


    I will like a plugin that will make people start with a clock no matter what if it is their 1st time on or they have been on before they will still get that item when they go join, I will also like it to be able to name the clock to something like Server Teleport Tool.
  2. Offline


    I could make it I don't know about naming it though, Do you still want it?
  3. Offline


    Want something where its always in the player's 9th inventory slot, and they can't move it? I could do this if you'd like.
  4. Offline


    Yea I will like that in the 1 or 9 :)
  5. Offline


  6. Offline


  7. Offline


    timtower Do you know? I read it has to do with metadata?
  8. Offline

    timtower Moderator Moderator

    1. public ItemStack setName(final ItemStack itemStack, final String name)
    2. {
    3. ItemStack ret = itemStack;
    4. ItemMeta itemMeta;
    5. if (ret.hasItemMeta())
    6. {
    7. itemMeta = ret.getItemMeta();
    8. }
    9. else
    10. {
    11. itemMeta = Bukkit.getItemFactory().getItemMeta(ret.getType());
    12. }
    13. itemMeta.setDisplayName(name);
    14. ret.setItemMeta(itemMeta);
    15. return ret;
    16. }

    This is what I use
  9. Offline


    Can you send the soruce ?????

Share This Page