Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hi guys. Is it possible to place some strings in chat input? Like it does by clicking on some messages created by using json, but how can i do the same, clicking on some mob, player or something else?

Would be nice, it there is way to do this on server side, but if someone knows how to do this on client side, it would be good too.

Edited by CeperaProduction
Solution was found

  • Author
13 hours ago, diesieben07 said:

You can send chat to a specific player by using EntityPlayer::sendMessage. You can send chat to everyone on the server using PlayerList::sendMessage.

I know this, but this is not what i need. I wanna do something like printing /msg <player> in chat input when one player clicks on anotherone

14 minutes ago, CeperaProduction said:

I know this, but this is not what i need. I wanna do something like printing /msg <player> in chat input when one player clicks on anotherone

 

Create an instance of GuiChat using the GuiChat(String) constructor, which populates the text box with the specified string; then display it with Minecraft#displayGuiScreen.

 

There's no existing server-to-client packet that does this, so you'll need to create your own.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

If the chat GUI is already open, you can add text to it by calling GuiTextField#writeText on GuiChat#inputField. The field is protected, so you'll need to access it via reflection.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • Author
45 minutes ago, Choonster said:

 

Create an instance of GuiChat using the GuiChat(String) constructor, which populates the text box with the specified string; then display it with Minecraft#displayGuiScreen.

 

There's no existing server-to-client packet that does this, so you'll need to create your own.

Thanks, it's right what i need.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.