Class Locations

java.lang.Object
dev.demeng.pluginbase.Locations

public final class Locations extends Object
Utilities for Location.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull org.bukkit.Location
    center(@NotNull org.bukkit.Location loc)
    Rounds a location to the center of a block.
    static @NotNull org.bukkit.Location
    toBlockLocation(@NotNull org.bukkit.Location loc)
    Converts a location to a block location (world and integer coordinates).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Locations

      public Locations()
  • Method Details

    • center

      @NotNull public static @NotNull org.bukkit.Location center(@NotNull @NotNull org.bukkit.Location loc)
      Rounds a location to the center of a block.
      Parameters:
      loc - The location to center
      Returns:
      The centered location
    • toBlockLocation

      @NotNull public static @NotNull org.bukkit.Location toBlockLocation(@NotNull @NotNull org.bukkit.Location loc)
      Converts a location to a block location (world and integer coordinates).
      Parameters:
      loc - The location to convert to a block location
      Returns:
      The block position