Class KUtil

java.lang.Object
com.kamikazejam.kamicommon.util.KUtil

public class KUtil extends Object
  • Field Details

  • Constructor Details

    • KUtil

      public KUtil()
  • Method Details

    • getMethodGetOnlinePlayers

      public static Method getMethodGetOnlinePlayers()
    • equals

      @Contract(value="null, null -> true; null, !null -> false; !null, null -> false", pure=true) public static boolean equals(Object object1, Object object2)
    • equals

      @Contract("null -> fail") public static boolean equals(Object... objects)
    • getNearestChatColor

      public static ChatColor getNearestChatColor(String hex)
    • getConsole

      @NotNull public static @NotNull ConsoleCommandSender getConsole()
    • getLocalSenders

      @NotNull public static @NotNull Set<CommandSender> getLocalSenders()
    • getOnlinePlayers

      public static Collection<Player> getOnlinePlayers()
    • getSender

      @Contract("null -> null") public static CommandSender getSender(Object senderObject)
    • asUuid

      @Contract("null -> null") public static UUID asUuid(String string)
    • isUuid

      public static boolean isUuid(@Nullable @Nullable String string)
    • list

      @SafeVarargs @NotNull public static <T> @NotNull List<T> list(T @NotNull ... items)
    • set

      @SafeVarargs @NotNull public static <T> @NotNull Set<T> set(T @NotNull ... items)
    • treeset

      @Contract("_ -> new") @NotNull public static @NotNull Set<String> treeset(String @NotNull ... items)
    • map

      @NotNull public static <K, V> @NotNull Map<K,V> map(K key1, V value1, Object @NotNull ... objects)
    • range

      @NotNull public static @NotNull List<Integer> range(int from, int to)
    • isNpc

      @Contract("null -> false") public static boolean isNpc(Object object)
    • isntNpc

      @Contract("null -> true") public static boolean isntNpc(Object object)
    • isSender

      @Contract("null -> false") public static boolean isSender(Object object)
    • isntSender

      @Contract("null -> true") public static boolean isntSender(Object object)
    • isPlayer

      @Contract("null -> false") public static boolean isPlayer(Object object)
    • isntPlayer

      @Contract("null -> true") public static boolean isntPlayer(Object object)
    • isNothing

      @Contract("null -> true") public static boolean isNothing(ItemStack itemStack)
    • getChatColor

      @Contract(pure=true) public static ChatColor getChatColor(@NotNull @NotNull DyeColor dyeColor)
    • isValidPlayerName

      public static boolean isValidPlayerName(String string)
    • getTpdelay

      public static int getTpdelay(Permissible permissible)
    • pickFirstVal

      @Contract("_, null -> null") public static <T> T pickFirstVal(@NotNull @NotNull Permissible permissible, Map<String,T> perm2val)
    • hasPermission

      @Contract("null, _ -> fail; !null, null -> fail") public static boolean hasPermission(Permissible permissible, String permission)
    • isSameBlock

      public static boolean isSameBlock(@NotNull @NotNull PlayerMoveEvent event)
    • isSameBlock

      public static boolean isSameBlock(@NotNull @NotNull Location one, @NotNull @NotNull Location two)
    • isSameChunk

      public static boolean isSameChunk(@NotNull @NotNull PlayerMoveEvent event)
    • isSameChunk

      public static boolean isSameChunk(@NotNull @NotNull Location one, @NotNull @NotNull Location two)
    • transform

      @NotNull public static <T> @NotNull List<T> transform(@NotNull @NotNull Iterable<T> items, Predicate<? super T> where, Comparator<? super T> orderby, Integer limit, Integer offset)
    • transform

      @NotNull public static <T> @NotNull List<T> transform(@NotNull @NotNull Iterable<T> items, Predicate<? super T> where)
    • transform

      @NotNull public static <T> @NotNull List<T> transform(@NotNull @NotNull Iterable<T> items, Predicate<? super T> where, Comparator<? super T> orderby)
    • transform

      @NotNull public static <T> @NotNull List<T> transform(@NotNull @NotNull Iterable<T> items, Predicate<? super T> where, Comparator<? super T> orderby, Integer limit)
    • transform

      @NotNull public static <T> @NotNull List<T> transform(@NotNull @NotNull Iterable<T> items, Predicate<? super T> where, Integer limit)
    • transform

      @NotNull public static <T> @NotNull List<T> transform(@NotNull @NotNull Iterable<T> items, Predicate<? super T> where, Integer limit, Integer offset)
    • transform

      @NotNull public static <T> @NotNull List<T> transform(@NotNull @NotNull Iterable<T> items, Comparator<? super T> orderby)
    • transform

      @NotNull public static <T> @NotNull List<T> transform(@NotNull @NotNull Iterable<T> items, Comparator<? super T> orderby, Integer limit)
    • transform

      @NotNull public static <T> @NotNull List<T> transform(@NotNull @NotNull Iterable<T> items, Comparator<? super T> orderby, Integer limit, Integer offset)
    • transform

      @NotNull public static <T> @NotNull List<T> transform(@NotNull @NotNull Iterable<T> items, Integer limit)
    • transform

      @NotNull public static <T> @NotNull List<T> transform(@NotNull @NotNull Iterable<T> items, Integer limit, Integer offset)
    • printStackTrace

      public static void printStackTrace()
    • printStackTrace

      public static void printStackTrace(String message)