Class StringFormatter

java.lang.Object
me.github.simonplays15.betterbansystem.core.chat.StringFormatter

public class StringFormatter extends Object
The StringFormatter class provides methods for formatting messages related to bans and kicks.
  • Constructor Details

    • StringFormatter

      public StringFormatter()
  • Method Details

    • formatKickMessage

      @Contract("_, _ -> new") @NotNull public static @NotNull String formatKickMessage (String sender, String reason)
      Formats a kick message by replacing placeholders in the kick message template with the sender and reason.
      Parameters:
      sender - the sender of the kick message
      reason - the reason for the kick
      Returns:
      the formatted kick message
    • formatBanMessage

      @Contract("_, -> new") @NotNull public static @NotNull String formatBanMessage (@NotNull @NotNull IBanEntry entry)
      Formats a ban message for a given ban entry.
      Parameters:
      entry - the ban entry to format the message for
      Returns:
      the formatted ban message
    • formatIpBanMessage

      @Contract("_, -> new") @NotNull public static @NotNull String formatIpBanMessage (@NotNull @NotNull IIPBanEntry entry)
      Formats an IP ban message using the given IIPBanEntry.
      Parameters:
      entry - The IIPBanEntry containing the ban details.
      Returns:
      The formatted IP ban message.