Solved is this possible

Discussion in 'Plugin Development' started by kamakarzy, May 5, 2013.

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

    kamakarzy

    i have this code
    Code:
    if(player1.getLocation().distanceSquared(Player2.getLocation()) <= 4) {
                        }
    player1 is a player but player 2 is a String is i possible that i can still use this code or would i need to scrap this please help
     
  2. Offline

    Diemex

    How about
    Code:
    //get a Player for a string
    getServer().getPlayer(Player2);
     
  3. Offline

    kamakarzy

    Diemex sorry i dont think you understand my player2 is already a String
    thanks
     
  4. Offline

    Diemex

    it gets a Player object for the string you provided, not a string for the Player Object....
     
  5. Offline

    kamakarzy

    yea when i seen it i understood it i just couldnt think of how to do it :)
     
Thread Status:
Not open for further replies.

Share This Page