Interface PlayerVisibilityController


@AvailableSince("0.0.30") public interface PlayerVisibilityController
Interface for controlling player visibility. Provides methods to show or hide one player from another.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    canSeePlayer(org.bukkit.entity.Player source, org.bukkit.entity.Player target)
    Checks whether the source player can currently see the target player.
    void
    hidePlayer(org.bukkit.plugin.java.JavaPlugin plugin, org.bukkit.entity.Player source, org.bukkit.entity.Player target)
    Hides the target player from the source player.
    void
    showPlayer(org.bukkit.plugin.java.JavaPlugin plugin, org.bukkit.entity.Player source, org.bukkit.entity.Player target)
    Makes the target player visible to the source player.
  • Method Details

    • showPlayer

      void showPlayer(org.bukkit.plugin.java.JavaPlugin plugin, org.bukkit.entity.Player source, org.bukkit.entity.Player target)
      Makes the target player visible to the source player.
      Parameters:
      plugin - The plugin instance making the request to show the player.
      source - The player who will see the target player.
      target - The player who will be made visible to the source player.
    • hidePlayer

      void hidePlayer(org.bukkit.plugin.java.JavaPlugin plugin, org.bukkit.entity.Player source, org.bukkit.entity.Player target)
      Hides the target player from the source player.
      Parameters:
      plugin - The plugin instance making the request to hide the player.
      source - The player who will no longer see the target player.
      target - The player who will be hidden from the source player.
    • canSeePlayer

      @AvailableSince("0.0.50") default boolean canSeePlayer(org.bukkit.entity.Player source, org.bukkit.entity.Player target)
      Checks whether the source player can currently see the target player.
      Parameters:
      source - The player whose visibility is being checked.
      target - The player whose visibility to the source is being checked.
      Returns:
      true if the source player can see the target player, false otherwise.