Hello, I want to make a custom placeholer, when a player's message includes "[kct]" it sends his normal message and replaces the "[kct]" part with a custom string.
This is what I want it to look like. Its from a plugin.
But mine looks like this:
Im using this code, anyone knows how to split the message into multiple parts before, and after the placeholder?
Thanks.
This is what I want it to look like. Its from a plugin.
But mine looks like this:
Im using this code, anyone knows how to split the message into multiple parts before, and after the placeholder?
Code:
on chat:
if message contains "[kct]":
set {_kct} to value of placeholder "supercredits_credits" from player
set {_m::*} to split the message by "[kct]"
set {_t::1} to text component from "<##81e600>[Počet KCT] &r"
set {_t::2} to text component from {_m::1}
set {_t::0} to text component from {_m::-1}
set hover event of {_t::1} to hover event showing text component from "<##81e600>Počet KCT hráče %player%: %{_kct}%"
set {_d} to merge components {_t::*}
send text component {_d} from player
Thanks.