Skip to content

Reworked the mention system#51

Merged
Kqliber merged 3 commits into
HelpChat:mainfrom
BlitzOffline:main
Apr 20, 2022
Merged

Reworked the mention system#51
Kqliber merged 3 commits into
HelpChat:mainfrom
BlitzOffline:main

Conversation

@BlitzOffline
Copy link
Copy Markdown
Member

@BlitzOffline BlitzOffline commented Apr 9, 2022

  • Added permissions to block mentions coming to user (global or personal)
  • Added permission to override that block
  • Fixed personal mentions only showing to the receiver and not the sender as well

There's still a couple problems with the mention system however:

  • When an item is named <online-player-name/everyone> and the player uses the item tag inside their message, it will act like a mention.
  • When the chat message has gradients or rainbows the mentions won't be picked up. I believe this is the same problem we used to have for the %message% tag (might need to confirm with the kyori team again if its a bug or not. I Don't remember what the outcome of the discussion last time was.) EDIT: After some tests turns out the problem is that the Component#replaceText method looks thru each component and their children independently and doesn't compress them as I first assumed.

I don't know if I'll get a solution in this PR but if you guys have ideas please share

Forgot to mention that this closes #50

- Added permissions to block mentions coming to user (global or personal)
- Added permission to override that block
- Fixed personal mentions only showing to the receiver and not the sender as well
@BlitzOffline BlitzOffline marked this pull request as draft April 9, 2022 15:49
This is to stop mentions from working in the actual format and only in messages
but this also means in the future we can somewhat easily add relational placeholder support(this requires a lot more thinking)
@BlitzOffline BlitzOffline marked this pull request as ready for review April 18, 2022 18:40
@Kqliber Kqliber merged commit 12c830b into HelpChat:main Apr 20, 2022
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

Successfully merging this pull request may close these issues.

[SUGGESTION] Per-player mentions toggle command

4 participants