Tps to spawn and permission

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

  1. Hey..
    So I am wondering what should I add in the PlayerLogin event that he will tp to the spawn whenever (for example he quit from the server so when he come back he wont stay in the same place he was but will tp to spawn)

    and I have made this config with player's kills/deaths tracker

    +
    made a GUI which yiu can choose here kits.. What code I need to add to make it possible to choose only if you have more than 20 kills?

    CASE DIAMOND_SWORD{
    p.getInventory().addItem(new ItemStack(Material.BOW));
    break;

    ( i need to add something to here to make it possible to choose only if you have more than 20kills?
     
  2. teleport(Location location)
    Teleports this entity to the given location.
    In your event click event check if the value that holds his kills is >= 20 else send a message that he doesn't have enough kills.
     
  3. I am not sure how to do it.. Could you give me a code hint? =)