Player instance

Discussion in 'Plugin Development' started by farget92, Oct 27, 2014.

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

    farget92

    Hello everyone,

    I hope, that I wrote good name of my post, because I don't know to explain, and how to describe it.
    Soo what is my problem ??

    Code:
    class CommandRea implements CommnadExecutor{
     
    private Team t;
     
      onCommnd .....{
     
      ..... cmd.equalsignorcase("sb"){
           
        Player p = (Player) sender;
     
          t = new Team(p, "", "");
     
        }
     
      }
    }
    Code:
    public class Team{
     
    private Player p;
    private String s;
    private String d;
     
    public Team(Player p, String s, String d)
     
    this.p = p;
    this.s = s;
    this.d = d;
     
    }
    And What I want ??

    Some past my instance of Team - t from command to move event

    Like, when I will type sb , i will create Team(p, "","") and from move class will be accesible with same instance....

    Like Team(p[farget],"AA","BB") will by accesible:
    Code:
    ..... Move Class ...
     
    t.getPlayer();
    Return farget
    But when cmd [sb] will typed by next person will be for each person each istance.

    Soo I hope , that you will understand me:)
    Thanks for every respons for this topic, because I can not find any solution.
     
  2. Offline

    CraftCreeper6

    farget92
    Please tell me your just a really bad speller.
     
    acer5999 likes this.
Thread Status:
Not open for further replies.

Share This Page