So, i got it working. Here's what i did:
First on the top of the class i made an plugin variable:
private Main plugin;
Right under it i init the class:
public gamemode(Main plugin) {
this.plugin = plugin;
}
And instead of mainClass, i used the plugin variable.
That's it.
Hi, im coding an Essentials Plugin. Right Now i am at the /gamemode command. The Command is working fine but, when i want to give another player gamemode (/gamemode 1 NAME) its giving me an NullPointerEX. Im fetching the target Player by:
Player target =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.