using multiple classes

Discussion in 'Spigot Plugin Development' started by _Zaboomafoo_, Jun 9, 2015.

  1. Hi all,
    I am kind of a newb and I would greatly appreciatiate if one of you told me how to set my classes up so they work with the main class and what code to put in main class for it to work with the event classes that I have. Thanks
  2. First, learn Java, would be better..
    • Agree Agree x 1
  3. Gianluca

    Gianluca Retired Resource Staff
    Retired Patron

    • Optimistic Optimistic x 1
  4. Also an 'upstream' note: don't use static to share variables between classes. There are constructors and method parameters for that ;)
  5. why would it being static matter, then what should i use?
  6. Aside it being a bad habit (static is not meant for lazy access, after all).

    I already mentioned alternatives :p (passing values in the constructor passing it to methods. The first is the most used in plugin development)
  7. ok i see now thanks for the help

    can you please check out my rapid fire guns thread I would really like help on that