Skip to content

Common Problems during Development

PXAV edited this page Feb 14, 2021 · 4 revisions

This page lists the most common problems that occur during plugin development with Kelp.

My command is not executed

If you have a command that if you execute neither prints an exception nor an unknown command message, look at your main command's class definition:

@Singleton // <-- this is probably missing
@CreateCommand(
  name = "exampleCmd",
  executorType = ExecutorType.PLAYER_ONLY)
public class ExampleCommand extends KelpCommand {
  ...
}

Kelp can only store your command information consistently if you make your main command a singleton. So make sure it has the @Singleton annotation.

I get a NullPointerException when I create a KelpItem

This might have multiple reasons. Make sure that none of your input is null (do you query your item name from a config, where the result is null? Or is the material null?).

If this is not the case, check whether you chose the correct material. If you want to create a sign item with the material OAK_SIGN, this refers to the block of an oak sign, but not to the item. Use OAK_SIGN_ITEM here instead. The same goes for banners (BLUE_BANNER_ITEM instead of BLUE_BANNER, etc.)

Clone this wiki locally