Class BukkitUtils

java.lang.Object
me.hsgamer.hscore.bukkit.utils.BukkitUtils

public final class BukkitUtils extends Object
Methods on Bukkit
  • Method Details

    • getPing

      public static int getPing(@NotNull @NotNull org.bukkit.entity.Player player)
      Get ping
      Parameters:
      player - the player
      Returns:
      the ping of the player
    • getAllUniqueIds

      @NotNull public static @NotNull List<UUID> getAllUniqueIds()
      Get all unique ids
      Returns:
      the unique ids
    • getAllPlayerNames

      @NotNull public static @NotNull List<String> getAllPlayerNames()
      Get all player names
      Returns:
      the player names
    • getMissingDepends

      @NotNull public static @NotNull List<String> getMissingDepends(@NotNull @NotNull List<String> depends)
      Get missing plugins from a list of given plugins
      Parameters:
      depends - the list of plugins
      Returns:
      the missing plugins
    • centerLocation

      public static org.bukkit.Location centerLocation(org.bukkit.Location location, boolean centerX, boolean centerY, boolean centerZ)
      Center the location
      Parameters:
      location - the location
      centerX - should the x be centered?
      centerY - should the y be centered?
      centerZ - should the z be centered?
      Returns:
      the centered location
    • centerLocation

      public static org.bukkit.Location centerLocation(org.bukkit.Location location)
      Center the location
      Parameters:
      location - the location
      Returns:
      the centered location
      See Also:
    • normalizeDegree

      public static float normalizeDegree(float degree)
      Get the normalized degree
      Parameters:
      degree - the degree
      Returns:
      the normalized degree
    • normalizeYawPitch

      public static org.bukkit.Location normalizeYawPitch(org.bukkit.Location location)
      Normalize the yaw and pitch of the location
      Parameters:
      location - the location
      Returns:
      the normalized location