Solved how to give a player an item on join and using AuthMe?

Discussion in 'Plugin Development' started by SkyleTyler1337, Aug 11, 2014.

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

    SkyleTyler1337

    current code!
    Code:
      @EventHandler
        public void onPlayerJoin(PlayerJoinEvent event) {
            Player player = event.getPlayer();
            PlayerInventory pi = player.getInventory();
            ChunkPlayPVP plugin = this.getMainClass();
            PvPGadget gadget = new PvPGadget(plugin);
            FileConfiguration file = plugin.getConfig();
            pi.setItem((int) file.getInt("pvp.slot"),
                    gadget.convertMaterialtoItemStack(gadget.getMaterial()));
        }
    i'm wondering how to give a player a item when they join and when AuthMe is enabled!
     
  2. Offline

    Gerov

    Are you updating the player's inventory?
     
  3. Offline

    SkyleTyler1337

    Gerov i'll try it
    edit: thanks it works :)
     
Thread Status:
Not open for further replies.

Share This Page