Having troubles with instances

Discussion in 'Plugin Development' started by TerroDoor, Dec 8, 2019.

  1. Offline


    Okay so i have classes with methods inside that I need to access inside other classes. I don’t want to make these static so how can I make an instance of these classes and register it to main?

    Previously I was using static methods and putting a “new <classname>” instance in my onEnable

    Sent from my iPhone using Tapatalk
  2. Offline

    timtower Moderator Moderator

    @TerroDoor Put fields in the main class.
    Make getters for them.
  3. Offline


    Thanks I’ll study into this, I need to practise with my constructors/getters/setters

    Sent from my iPhone using Tapatalk

Share This Page