What should be in the plugin field when registering commands?

Im testing the features of sponge and currently I’m following the command tutorial but when registering commands i have no clue what should be in the plugin field. In the tutorial it just says plugin and i have no clue what this is referring to.

Umm… it refers to your plugin class, whichever object you have annotated with @Plugin

so i can just do Plugin.class? it crashed last time i tried that

java.lang.IllegalArgumentException: The provided plugin object does not have an associated plugin container (in other words, is ‘plugin’ actually your plugin object?

In this context, ‘Plugin’ means the instance of your main class, not the Class itself (e.g. CommandManager#register(this, myCommand, "testCommand")

That is assuming that your doing registration in your main plugin class (which you probably should be). If for whatever reason your not, just pass the plugin object to whatever method you’re invoking, or the listener and then the method, etc.

Yeah I was trying to do all my command registration in another class so i just moved them to the main class and it worked fine