Retrieving player from args[0]

Discussion in 'Plugin Development' started by Highace2, Apr 24, 2012.

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

    Highace2

    Title says it all... How do I do that?
     
  2. Offline

    Zelnehlun

    If the name is inside a String[] which is called args (I suppose when catching the onCommand event) then you can try getting the player by using Bukkit.getPlayer(args[0]);

    (Always check if the variable is null otherwise you'll encounter weird errors)
     
Thread Status:
Not open for further replies.

Share This Page