Player Method

Discussion in 'Plugin Development' started by jay275475, Aug 26, 2013.

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

    jay275475

    Hello I forgot I to do the Player Method like Player player = player sender something like that i forgot...
     
  2. Offline

    metalhedd

    brace yourself for the wave of "lrn2java's". this is basic casting.

    Player player = (Player) sender; // assuming 'sender' is an instance of CommandSender
     
  3. Offline

    Pizza371

    @jay276475 you mean ccommandsender? Player p = (Player)sender;
     
  4. Offline

    Bartoke

    You mean making a sender (the CommandSender) a Player?

    Code:java
    1. Player player = (Player) sender;


    You should check if the sender is a player first, though.
     
  5. Offline

    jay275475

    Thank you Guys I forgot
     
Thread Status:
Not open for further replies.

Share This Page