Spigot
Utility object providing Spigot-specific implementations of the VitalUtils abstraction.
This object offers a collection of methods tailored for the Spigot server API, enabling formatted messaging, broadcasting actions, handling titles and action bars, and applying or clearing effects on players. It defines actions for efficiently working with Spigot's CommandSender and Player entities.
Functions
Broadcasts an action to a collection of players based on a specified condition.
Broadcasts the removal of a specific potion effect to all players satisfying the given predicate.
Removes all active potion effects from players that satisfy the specified predicate.
Broadcasts a formatted action bar message to all players satisfying the given predicate.
Broadcasts a formatted message to all players satisfying the given predicate.
Sends a persistent formatted title and subtitle to all players that satisfy the specified predicate. The title remains displayed with the specified fade-in duration.
Broadcasts a formatted title to all eligible recipients.
Broadcasts a formatted title and subtitle to all players satisfying the given predicate.
Broadcasts a potion effect to all players who meet the specified condition.
Broadcasts a sound to all players satisfying the given predicate.
Calculates the total number of edges for a cuboid defined by two 3D locations.
Calculates the surface area of a cuboid region defined by two locations.
Calculates the volume of a rectangular cuboid defined by two locations.
Determines if the current material can be placed in mid-air without support.
Configures the game rules and environment settings for a World to align with a controlled or static gameplay setup.
Cleans and configures game rules for a specified world to ensure a controlled gameplay setup.
Returns a Location object that represents the center of the block of the current location. The method adjusts the current location's coordinates to align it to the exact center of the block it belongs to.
Calculates the center of the block for the given location, with optional offsets.
Retrieves the center block side location of a Location with specific offsets.
Calculates the top center location of the block the current location belongs to.
Retrieves or creates a custom nametag team for the player in the specified scoreboard.
Calculates and returns the edge locations of a cuboid defined by two diagonal corners.
Finds the highest safe location starting from a specified point and moving upward. A location is considered safe if the block at the level and the block above it are both air.
Determines the highest non-air block location from the specified start height and returns a safe location above it.
Generates a random location within the valid world boundary and returns it.
Generates a random location within a rectangular area defined by two corner locations.
Calculates the locations on the surface of the cuboid defined by two positions.
Generates a sequence of all block locations within the cuboid defined by two corner locations. The locations must belong to the same world, and the sequence is generated from the minimum coordinates to the maximum coordinates of the defined cuboid.
Determines if the current location is inside a defined 3D rectangular area.
Determines if the current Material instance represents a redstone-related machine or component.
Checks if the material is related to vegetation.
Opens a custom inventory menu for the player based on the provided menu type.
Sends a formatted action bar message to the current player.
Sends a formatted message to the current player or client system (CS).
Sends a formatted, persistent title and subtitle to the current player or client system (P).
Sends a formatted title and subtitle to the current player. The title and subtitle are displayed in the player's title bar.
Sends a formatted title and subtitle to the current player or client system (P).
Sets a custom nametag for a SpigotPlayer instance, along with managing the scoreboard teams required to properly display the nametag information.
Sets a custom nametag for an Entity instance, along with managing the scoreboard teams required to properly display the nametag information.
Stops all possibly active looped sounds for the current player.
Stops a possibly active sound loop for the current player and the given sound. If the current player does not have the sound active, this function does nothing.
Teleports the player to the specified entity's location while applying a visual effect.
Teleports a player to a specified location with a temporary visual potion effect.