Class InstructionUtil

java.lang.Object
xyz.gmitch215.socketmc.instruction.InstructionUtil

public final class InstructionUtil extends Object
Utilities used in the validaton and execution of instructions.
  • Field Details

    • VALID_EMAIL_ADDRESS

      public static final Pattern VALID_EMAIL_ADDRESS

      A regular expression pattern that matches a valid email address.

      This expression is based on the RFC 5322 standard for email addresses.

  • Method Details

    • isEmailAddress

      public static boolean isEmailAddress(@Nullable @Nullable String email)
      Checks if the given string is a valid email address.
      Parameters:
      email - The email address to check.
      Returns:
      true if the email address is valid, false otherwise.
      See Also:
    • parseColor

      @NotNull public static @org.jetbrains.annotations.NotNull float[] parseColor(int color)
      Parses a color integer into an array of floats representing the RGB values.
      Parameters:
      color - The color integer to parse.
      Returns:
      An array of floats representing the RGB values.