Plugin registration problem

Sponge Build: spongevanilla-1.8.9-3.1.0-BETA-246
Java Version: 1.8.0_73

[spoiler “Minecraft Logs”]


It appears Sponge has a problem with my @Plugin class, as the server keeps displaying the same exception. The source code of my main class is below.

`@Plugin(id = “test”, name = “Dice Roller Initializer”, version = “1.0”)
public class DiceRollerInitializer {

public void onServerStart(GameStartedServerEvent event) {


Are there any requirements except the @Plugin annotation that I must follow in order for my plugin to be loaded properly? I use maven to build the .jar file, in case this has an impact on the process.

Well, if you, oh I don’t know, read the error, you see that it is having trouble with your command registration, on line 13 of DiceRollInitializer. The problem is you are registering a command and passing a non-plugin object in the plugin parameter.

Edit: oh and line 50 of DiceRollCommand, that’s probably the root actually.

The plugin object passed during command registration must be your instance DiceRollerInitializer, as this is how the command manager can create aliases such as “/test:dice” for example.

1 Like

and figure out which command belong to which plugins :slight_smile: