Package me.hsgamer.hscore.bukkit.utils
Class BukkitUtils
java.lang.Object
me.hsgamer.hscore.bukkit.utils.BukkitUtils
Methods on Bukkit
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.LocationcenterLocation(org.bukkit.Location location) Center the locationstatic org.bukkit.LocationcenterLocation(org.bukkit.Location location, boolean centerX, boolean centerY, boolean centerZ) Center the locationGet all player namesGet all unique idsgetMissingDepends(@NotNull List<String> depends) Get missing plugins from a list of given pluginsstatic intgetPing(@NotNull org.bukkit.entity.Player player) Get pingstatic floatnormalizeDegree(float degree) Get the normalized degreestatic org.bukkit.LocationnormalizeYawPitch(org.bukkit.Location location) Normalize the yaw and pitch of the location
-
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
Get all unique ids- Returns:
- the unique ids
-
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 locationcenterX- 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
-