Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the interface? #3

Open
PixelSkider opened this issue Sep 7, 2024 · 0 comments
Open

How to get the interface? #3

PixelSkider opened this issue Sep 7, 2024 · 0 comments

Comments

@PixelSkider
Copy link

public void printChatMessage(IChatComponent p_146227_1_)
{
    this.printChatMessageWithOptionalDeletion(p_146227_1_, 0);
}

i want to use this void but the IChatComponent is interface 

mapping:
BEGIN_KLASS_DEF(IChatComponent, "eu")
END_KLASS_DEF()
BEGIN_KLASS_DEF_EX(ChatComponentStyle, "es", IChatComponent)
END_KLASS_DEF()

BEGIN_KLASS_DEF_EX(ChatComponentText, "fa", ChatComponentStyle)
	jni::method<String, "g"> getChatComponentText_TextValue{ *this };
	jni::constructor<String> constructor{ *this };
END_KLASS_DEF()

BEGIN_KLASS_DEF_EX(GuiNewChat, "avt", Gui)
	jni::method<void, "a", jni::NOT_STATIC, ChatComponentText> printChatMessage{ *this };
	jni::method<jint, "g"> getChatHeight{ *this };

END_KLASS_DEF()

code:
maps::ChatComponentText text =
maps::ChatComponentText::new_object(&maps::ChatComponentText::constructor,maps::String::create("Test"));
guiChat.printChatMessage(text);

i want to know how to fix and use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant