Custom Item ID?

Discussion in 'Plugin Development' started by vasil7112, Nov 3, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    vasil7112

    Hello fellow developers,
    I've been searching all over the net, but i couldn't find the this :/
    You are my last chance:)

    What i am looking for is for a code that will allow my items to have a custom id(e.x 9001:1), so as result people can add them to Essentials first join items.

    Any ideas?

    Kind regards,
    vasil7112
     
  2. Offline

    qlimax5000

    Impossible.
     
  3. Offline

    maxben34

    Actually, i do believe there is a way to do this. (Search Custom ID's in the bar up top). I think i remember seeing a resource for this. However, it would just be more beneficial to you if you could just make some code that gives players items on their first join. You could just do this:

    Code:java
    1. @EventHandler
    2. public void onPlayerFirstJoin(PlayerJoinEvent e){
    3. if(!(e.getPlayer().hasPlayedBefore())){
    4. e.getPlayer().getInventory().setItem(new ItemStack(Material.ANY_ITEM_HERE);
    5. Bukkit.broadcastMessage("Welcome to the server " + e.getPlayer().getName());
    6. //do the same thing as the line above for any other items
    7. }else{
    8. Bukkit.broadcastMessage("Welcome to the server " + e.getPlayer().getName());
    9. }
    10. /*This gives player items if they have never joined the server before
    11. *If they have joined before, then a message will just be broadcasted
    12. *You still would need to register events and make a plugin.yml
    13. /
     
Thread Status:
Not open for further replies.

Share This Page