Join Items

Discussion in 'Spigot Plugin Development' started by Pinkpig58, Jun 14, 2016.

  1. Hey,

    How would I make players be able to join with, let's say, a compass in slot 1 of the players inventory?
     
  2. With an event handler.
     
    • Agree Agree x 1
  3. @EventHandler
    public void onJoin(PlayerJoinEvent e){
    p.getInventory().addItem(new ItemStack(Material.COMPASS);

    This would be probably the easiest method :)
     
  4. You keep changing the variable name...
    Also to set an items display-name you might want to look at ItemMeta