How to initialize Player?

Discussion in 'Plugin Development' started by civ77, Jan 21, 2012.

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

    civ77

    How do I initialize a Player variable?
     
  2. Offline

    javoris767

    Player player = Player(sender); | Player player = Player.getPlayer(); | Player player = event.getPlayer(); ?
     
    civ77 likes this.
  3. Offline

    tkausl

    Code:
    Player player = Player(sender);
    should be
    Code:
    Player player = (Player) sender;
    :p
     
  4. You can't just initialise it yourself. You either need to grab it using getPlayer("playername") or casting from command sender if processing your code in the onCommand event.
     
Thread Status:
Not open for further replies.

Share This Page