Class Text

java.lang.Object
net.flick.serverapi.protocol.Text

public final class Text extends Object
String validation shared by encoder and decoder. Mirrors the client's sanitiser (net.flick.client.api.ApiText) so a server sees exactly what the player will see.
  • Field Details

    • ID

      public static final Pattern ID
      Waypoint ids, nonces: [A-Za-z0-9_.:-]{1,64}.
    • MODULE_ID

      public static final Pattern MODULE_ID
      Flick module ids: [a-z0-9_]{1,32}.
    • MOD_ID

      public static final Pattern MOD_ID
      Fabric/Forge mod ids reported by the client.
    • DIMENSION

      public static final Pattern DIMENSION
      Dimension keys, e.g. minecraft:the_nether.
    • NONCE

      public static final Pattern NONCE
  • Method Details

    • clean

      public static String clean(String s, int max)
      Removes legacy formatting codes (section sign + code), control / format / private-use characters, collapses whitespace and cuts the result to max code points.