Two Questions

Discussion in 'Plugin Development' started by Kingzuck, Aug 12, 2011.

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


    Hello people,

    I have two questions:

    -How can I check whether the spielder for the first time on the server?
    -How can I give items a player

    Thank you ever =)
  2. Offline


    Wrong forum but

    1. FirstJoin (my plugin)
    2nd. Commandbook
  3. Offline


    I'm not looking for plugins;)
  4. Offline


    then learn to write in proper english dude.

    I could give you a code snipped to check if a player joined for the first time but now I don't feel like it anymore xD
  5. Offline


    yes sorry for my english not good but if I can, I can not help;)
  6. Offline


    No the reason is the giant font you used as if I'm stupid because I didn't know what you meant ..... >_>

    but I'll be nice, here:

            Player p = event.getPlayer();
            String name = p.getName();
            File file=new File("world" +"/players/" + name + ".dat");
                      boolean exists = file.exists();
    then you can simply check wether the boolean "exists" is true or false, therefore you know if the player is new or not.

    you can also get the world via the player but that has issues with the nether and stuff so I just use "world" because thats how mine is called ^^
    Kingzuck likes this.
  7. Offline


    thanks but now how do I integrate one event because even eclipse alwaysemphasizes
  8. Offline


    If you don't know how to use events you are not ready to make plugins ..... Learn java first D:
Thread Status:
Not open for further replies.

Share This Page