add /csay

make /say and /csay not parse minimessage messages
add a strip color function to strip a message of minimessage strings
This commit is contained in:
Taah
2022-04-10 15:27:25 -07:00
parent b449d732b0
commit dc65187381
7 changed files with 62 additions and 12 deletions

View File

@ -173,8 +173,8 @@ public class NotesCMD extends PlexCommand
AtomicReference<Component> noteList = new AtomicReference<>(Component.text("Player notes for: " + plexPlayer.getName()).color(NamedTextColor.GREEN));
for (Note note : notes)
{
Component noteLine = Component.text(note.getId() + " - Written by: " + DataUtils.getPlayer(note.getWrittenBy()).getName() + " on " + DATE_FORMAT.format(note.getTimestamp())).color(NamedTextColor.YELLOW).decoration(TextDecoration.ITALIC, false);
noteLine = noteLine.append(Component.space()).append(Component.text(note.getNote())).color(NamedTextColor.YELLOW).decoration(TextDecoration.ITALIC, true);
Component noteLine = mmString("<gold><!italic>" + note.getId() + " - Written by: " + DataUtils.getPlayer(note.getWrittenBy()).getName() + " on " + DATE_FORMAT.format(note.getTimestamp()));
noteLine = noteLine.append(mmString("<newline><yellow># " + note.getNote()));
noteList.set(noteList.get().append(Component.newline()));
noteList.set(noteList.get().append(noteLine));
}