Package me.ulrich.outpost.data
Class OptimalVisibilityManager
java.lang.Object
me.ulrich.outpost.data.OptimalVisibilityManager
- All Implemented Interfaces:
VisibilityManager
The default
VisibilityManager implementation-
Constructor Summary
ConstructorsConstructorDescriptionOptimalVisibilityManager(Hologram hologram) Construct the defaultVisibilityManagerfor aHologram -
Method Summary
Modifier and TypeMethodDescriptionGet the linkedHologramthat thisVisibilityManagerrepresentsvoidhideTo(org.bukkit.entity.Player player) Hide theHologramfrom aPlayerbooleanCheck if theHologramis visible to players by defaultbooleanisVisibleTo(org.bukkit.entity.Player player) Check if theHologramis visible to aPlayervoidresetVisibility(org.bukkit.entity.Player player) Reset the visibility of theHologramfor aPlayervoidReset the visibility for all onlinePlayersvoidsetVisibleByDefault(boolean visibleByDefault) voidshowTo(org.bukkit.entity.Player player) Show theHologramto aPlayer
-
Constructor Details
-
OptimalVisibilityManager
Construct the defaultVisibilityManagerfor aHologram- Parameters:
hologram- TheHologramparent
-
-
Method Details
-
getHologram
Description copied from interface:VisibilityManagerGet the linkedHologramthat thisVisibilityManagerrepresents- Specified by:
getHologramin interfaceVisibilityManager- Returns:
- The
Hologram
-
isVisibleByDefault
public boolean isVisibleByDefault()Description copied from interface:VisibilityManagerCheck if theHologramis visible to players by default- Specified by:
isVisibleByDefaultin interfaceVisibilityManager- Returns:
- The
Booleanvalue for if its visible by default.
-
setVisibleByDefault
public void setVisibleByDefault(boolean visibleByDefault) Description copied from interface:VisibilityManager- Specified by:
setVisibleByDefaultin interfaceVisibilityManager- Parameters:
visibleByDefault- The new visible by defaultBoolean
-
showTo
public void showTo(org.bukkit.entity.Player player) Description copied from interface:VisibilityManagerShow theHologramto aPlayer- Specified by:
showToin interfaceVisibilityManager- Parameters:
player- ThePlayerto display theHologramto
-
hideTo
public void hideTo(org.bukkit.entity.Player player) Description copied from interface:VisibilityManagerHide theHologramfrom aPlayer- Specified by:
hideToin interfaceVisibilityManager- Parameters:
player- ThePlayerto hide theHologramfrom
-
isVisibleTo
public boolean isVisibleTo(org.bukkit.entity.Player player) Description copied from interface:VisibilityManagerCheck if theHologramis visible to aPlayer- Specified by:
isVisibleToin interfaceVisibilityManager- Parameters:
player- ThePlayerto check the visibility status of- Returns:
- The
Booleanvisibility status
-
resetVisibility
public void resetVisibility(org.bukkit.entity.Player player) Description copied from interface:VisibilityManagerReset the visibility of theHologramfor aPlayer- Specified by:
resetVisibilityin interfaceVisibilityManager- Parameters:
player- ThePlayerto reset the visibility for
-
resetVisibilityAll
public void resetVisibilityAll()Description copied from interface:VisibilityManagerReset the visibility for all onlinePlayers- Specified by:
resetVisibilityAllin interfaceVisibilityManager
-