Class Utils

java.lang.Object
com.shanebeestudios.coreapi.util.Utils

public class Utils extends Object
General utility class
  • Method Details

    • setPrefix

      @Deprecated public static void setPrefix(String prefix)
      Deprecated.
      Set the prefix to be used in messages
      Parameters:
      prefix - Prefix to be used in messages
    • setMiniPrefix

      public static void setMiniPrefix(String prefix)
      Set the prefix to be used in mini messages
      Parameters:
      prefix - Prefix to be used in mini messages
    • getColString

      @Deprecated public static String getColString(String string)
      Deprecated.
      Use getMini(String) instead
      Get a colored string, accepts HEX color codes
      Parameters:
      string - String to apply color to
      Returns:
      Colored string
    • getMini

      public static Component getMini(String message)
      Get a mini message from string
      Parameters:
      message - String to convert to mini message
      Returns:
      Mini message from string
    • log

      @Deprecated public static void log(String message, Object... objects)
      Deprecated.
      Log a formatted message to console
      Parameters:
      message - Formatted message
      objects - Objects for format
    • logMini

      public static void logMini(String message, Object... objects)
      Log a formatted mini-message to console
      Parameters:
      message - Formatted message
      objects - Objects for format
    • sendTo

      @Deprecated public static void sendTo(CommandSender sender, String message, Object... objects)
      Send a colored/prefixed message to a command sender
      Parameters:
      sender - Sender to receive message
      message - Formatted message to send
      objects - Objects to include in format
    • sendMiniTo

      public static void sendMiniTo(CommandSender sender, String message, Object... objects)
      Send a colored/prefixed mini-message to a command sender
      Parameters:
      sender - Sender to receive message
      message - Formatted message to send
      objects - Objects to include in format
    • broadcast

      @Deprecated public static void broadcast(String message, Object... objects)
      Deprecated.
      Broadcast a message to all players and console
      Parameters:
      message - Formatted message to send
      objects - Objects to include in format
    • broadcastMini

      public static void broadcastMini(String message, Object... objects)
      Broadcast a mini-message to all players and console
      Parameters:
      message - Formatted message to send
      objects - Objects to include in format