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

@PostSubscribe with ChatSendEvent behaves weirdly. #159

Open
Janrupf opened this issue Mar 20, 2021 · 0 comments
Open

@PostSubscribe with ChatSendEvent behaves weirdly. #159

Janrupf opened this issue Mar 20, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Janrupf
Copy link
Contributor

Janrupf commented Mar 20, 2021

Description
When using @PostSubscribe and sending a message to the player, the message will appear before the actual chat message from the player.

To Reproduce the Bug

  @PostSubscribe
  public void onChat(ChatSendEvent event, ChatConfig config, ClientPlayer player) {
    if (event.getMessage().equals("Remind me!")) {
      player.sendMessage(
          textComponentBuilderFactory.newBuilder().text("You will be reminded in 60 seconds!").build(), null);
    }
  }

Chat output:

You will be reminded in 60 seconds!
<FlintGradle> Remind me!

Expected behavior
The message You will be reminded in 60 seconds! appears after the Remind me! message has been displayed.

Screenshots
image

Log Output

[21:04:01] [Server thread/INFO]: <FlintGradle> Remind me!
[21:04:01] [main/INFO]: [CHAT] You will be reminded in 60 seconds!
[21:04:01] [main/INFO]: [CHAT] <FlintGradle> Remind me!

System Information (please fill in):

  • Operating System: Arch Linux 5.11.6-arch1-1
  • Launcher: flint-gradle
  • Installed Mods: Modified package template
  • Flint Version: 2.0.26
  • Minecraft Versions: 1.15.2
  • Java Version: OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)
@Janrupf Janrupf added the bug Something isn't working label Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant