В логах пишет, что команда вернула нулл, хотя вернуть его она не могла по любому.
@Override
public CommandResult execute(CommandSource src, CommandContext args) throws CommandException
{
Main.getLogger().debug("It works!!!");
return CommandResult.success();
}
`@Plugin(
id = "toturial",
name = "Toturial",
authors =
{
"GoogleTn"
}
)
public class Main
{
@Inject
private static Logger logger;
public static Logger getLogger() {return logger;}
PluginContainer plugin = new PluginContainer()
{
@Override
public String getId() {return "toturial";}
};
CommandSpec myCommandSpec = CommandSpec.builder()
.description(Text.of("Hello World Command"))
.permission("toturial.command.helloworld")
.executor(new HelloWorldCommand())
.build();
@Listener
public void onServerStart(GameStartedServerEvent event)
{
Sponge.getCommandManager().register(plugin, myCommandSpec, "helloworld", "hello", "test");
logger.debug("Test");
}
}
`