Class FoliosMentions

java.lang.Object
net.ixdarklord.folios.internal.client.FoliosMentions

public final class FoliosMentions extends Object
Mentions of a book's pages in chat. With a book open, the mention key (M) over a page writes a mention of it into a new chat message, [[mymod:handbook|basics/first_steps|2]] (the book, the entry, and which page of the entry's JSON, so it finds the same page whatever size or language another player's pages are laid out at). Every client with Folios shows a mention in a message as the page's name, pressed to open the book there; to a player without the book, or who hasn't unlocked the page, it is scrambled. An entry left empty mentions the book's front.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.client.KeyMapping
    The key that mentions the page under the pointer.
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.network.chat.Component
    decorate(net.minecraft.network.chat.Component message)
    A chat message with each mention in it shown as the page's name (or scrambled); others as they are.
    static void
    mention(net.minecraft.resources.Identifier book, @Nullable FoliosBook.Location at)
    Opens the chat with a mention of a page written in, to say something about it and send.
    static boolean
    open(String written)
    <book> <entry or -> <page>, as a mention's command gives it: opens the book there, if the player may.
    static String
    token(net.minecraft.resources.Identifier book, @Nullable FoliosBook.Location at)
    A mention of a page, as written in chat; at null for the book's front.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • KEY

      public static final net.minecraft.client.KeyMapping KEY
      The key that mentions the page under the pointer.
  • Method Details

    • token

      public static String token(net.minecraft.resources.Identifier book, @Nullable FoliosBook.Location at)
      A mention of a page, as written in chat; at null for the book's front.
    • mention

      public static void mention(net.minecraft.resources.Identifier book, @Nullable FoliosBook.Location at)
      Opens the chat with a mention of a page written in, to say something about it and send.
    • decorate

      public static net.minecraft.network.chat.Component decorate(net.minecraft.network.chat.Component message)
      A chat message with each mention in it shown as the page's name (or scrambled); others as they are.
    • open

      public static boolean open(String written)
      <book> <entry or -> <page>, as a mention's command gives it: opens the book there, if the player may.