-
Notifications
You must be signed in to change notification settings - Fork 8
Common Problems during Development
This page lists the most common problems that occur during plugin development with Kelp.
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.
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.)
This error is a behavior caused by the way the Minecraft protocol works. You cannot receive an interact packet and send an inventory open packet in the same server tick. So try wrapping your operation into a DelayedScheduler
with a small delay of like 50ms / 1 tick
or so.
This is a problem that occurs when you use an AnimatedInventory
and open another inventory or a prompt from there. The server still thinks the player wants to have the animated inventory and keeps updating the animation, which forces the player to open the previous animated inventory again. To fix this, call KelpPlayer#closeInventory
before opening the new inventory with KelpPlayer#openAnvilPrompt()
or KelpPlayer#openInventory(AnimatedInventory)
. This stops the old schedulers and allows fresh inventories to be displayed correctly.
(c) 2019-2021 pxav.
Kelp is an open-source project maintained by multiple developers. If you have additions/questions/problems to report about the wiki, feel free to create an issue here on GitHub or join the Discord
- SQL Module coming soon
- Documentation in progress