Object passing

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

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

    farget92

    Hello everyone,

    I have really big problem. Which ?
    I want to make some instance of my class, and I want to send this instatnce to another.
    Or I hope soo, because this object oriented programming is soo ..., but it is only one solution.

    Code:
    public Class{
     
        public Teams(Player p, Boolean B, Boolean R){
           
            this.p = p;
            this.BP = B;
            this.RP = R;
           
            PP.add(p);
           
        }
     
     
     
    }
    And I want to get some method like:

    Code:
    public Teams getTeam(Player p){
     
    return Teams(p, false, false);
     
    }
     
    
    But isn't work
    Please help me with me problem , thanks you.
     
  2. Offline

    teej107

    If you new Java, you should know that is what it takes to create an object.

    Also why are you passing Boolean object through the parameters? Pass the boolean primitive instead.
     
    Rocoty and es359 like this.
  3. Offline

    Rocoty

    That's awfully clever!
     
    teej107 likes this.
Thread Status:
Not open for further replies.

Share This Page