Solved Quick Question

Discussion in 'Plugin Development' started by HeadGam3z, May 27, 2014.

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

    HeadGam3z

    Say I have this in a class:
    Code:java
    1. Map<Player, Integer> bountys = new HashMap<Player, Integer>();


    Is there a way to access "bountys" again from a different class?
     
  2. Offline

    Obnoxious_Ninja

    Make it "public static Map<Player, Integer> bountys;", register it in onEnable(), then just use it wherever.

    For example "MAINCLASS.bountys.get(SOMETHING);
     
  3. Offline

    Gater12

    teej107 likes this.
  4. Offline

    minekam20

    What i would do its go to main class and make it public so it would be like this :
    Code:java
    1. public Map<Player, Integer> bountys = new HashMap<Player, Integer>();
     
Thread Status:
Not open for further replies.

Share This Page