This is an example of a command that will showcase a title to the player in-game.


image


public class ModdedCommand extends CommandBase {

    public ModdedCommand() {
        super("moddedcommand", "A test command", false);
    }

    @Override
    protected void executeSync(@Nonnull CommandContext commandContext) {
        commandContext.senderAsPlayer().getWorld().execute(() -> {
            EventTitleUtil.showEventTitleToPlayer(commandContext.senderAsPlayer().getReference(), Message.raw("It's modded!"), Message.raw("Yeppers"), true, commandContext.senderAsPlayer().getWorld().getEntityStore().getStore());
        });
    }
}


Thank you to Rick for helping create this tutorial!