Hello. I had this error after I put HashMap Adrenalins and GUI (ClickEvent) in different classes. I made them normal access. If you understand how to do it right, say EXAMPLE! And not just words, I do not always understand! https://pastebin.com/LYqvWkCA Forgive my English.
@ewrs Please post your code. We can't do anything with just the error. And put the map in the main class, then make a getter for it.
MAIN: NULL AdrenalinMechanic: NULL The GUI simply adds the player. Put But why do I need getters? And how can I apply them in this case ??
@ewrs Getters and non static are basic java. Not gonna explain that. Why do you make instances and you register different ones? And your code doesn't even have the line with the error...
and what should I do? .. I tried all my options. I did getter and setter, but the error repeats ... What do I do, @timtower? https://pastebin.com/tuZhfc3F
@ewrs The main issue is you're not initializing the hashmap, its null you need to do public HashMap<String, Integer> Adrenalins = new HashMap<String, Integer>(); also just another thing i noticed in your main class this.getServer().getPluginManager().registerEvents(new NokdaynMechanic(), (Plugin)this); you don't need to cast Plugin to your main class because it extends JavaPlugin also you don't need new NokdaynMechanic() just use the variable you created at the top so it should be this.getServer().getPluginManager().registerEvents(NokdaynMechanic, this); same goes for all the other events