1313import me .fallenbreath .velocitywhitelist .utils .UuidUtils ;
1414import net .kyori .adventure .text .Component ;
1515import net .kyori .adventure .text .TextComponent ;
16+ import net .kyori .adventure .text .minimessage .MiniMessage ;
1617import org .jetbrains .annotations .NotNull ;
1718import org .jetbrains .annotations .Nullable ;
1819import org .slf4j .Logger ;
@@ -260,7 +261,8 @@ private void handlePlayerAddedToBlacklist(Player player)
260261 {
261262 var profile = player .getGameProfile ();
262263 this .logger .info ("Kicking player {} ({}) since it's being added to the blacklist" , profile .getName (), profile .getId ());
263- player .disconnect (Component .text (this .config .getBlacklistKickMessage ()));
264+ Component message = MiniMessage .miniMessage ().deserialize (this .config .getBlacklistKickMessage ());
265+ player .disconnect (message );
264266 }
265267
266268 public boolean removePlayer (CommandSource source , PlayerList list , String value )
@@ -297,7 +299,7 @@ public void onPlayerLogin(LoginEvent event)
297299 {
298300 if (!this .isPlayerInWhitelist (profile ))
299301 {
300- TextComponent message = Component . text (this .config .getWhitelistKickMessage ());
302+ Component message = MiniMessage . miniMessage (). deserialize (this .config .getWhitelistKickMessage ());
301303 event .setResult (ResultedEvent .ComponentResult .denied (message ));
302304
303305 this .logger .info ("Kicking player {} ({}) since it's not in the whitelist" , profile .getName (), profile .getId ());
@@ -307,7 +309,7 @@ else if (this.blacklist.isActivated())
307309 {
308310 if (this .isPlayerInBlacklist (profile ))
309311 {
310- TextComponent message = Component . text (this .config .getBlacklistKickMessage ());
312+ Component message = MiniMessage . miniMessage (). deserialize (this .config .getBlacklistKickMessage ());
311313 event .setResult (ResultedEvent .ComponentResult .denied (message ));
312314
313315 this .logger .info ("Kicking player {} ({}) since it's in the blacklist" , profile .getName (), profile .getId ());
0 commit comments