Class Hologram


  • public class Hologram
    extends TimedObject
    A Utilities class to create a Hologram
    • Constructor Summary

      Constructors 
      Constructor Description
      Hologram​(boolean showToAll, org.bukkit.Location location, java.lang.String text)
      Create a Hologram TimedEvent is null
      Hologram​(boolean showToAll, org.bukkit.Location location, java.lang.String text, TimedEvent timedEvent)
      Create a Hologram Doesn't start TimedEvent
      Hologram​(boolean showToAll, org.bukkit.Location location, java.lang.String text, TimedEvent timedEvent, boolean startTimedEvent)
      Create a Hologram
      Hologram​(boolean showToAll, org.bukkit.Location location, java.util.List<java.lang.String> text)
      Create a Hologram TimedEvent is null
      Hologram​(boolean showToAll, org.bukkit.Location location, java.util.List<java.lang.String> text, TimedEvent timedEvent)
      Create a Hologram Doesn't start TimedEvent
      Hologram​(boolean showToAll, org.bukkit.Location location, java.util.List<java.lang.String> text, TimedEvent timedEvent, boolean startTimedEvent)
      Create a Hologram
      Hologram​(org.bukkit.Location location)
      Create a Hologram Shows to all, TimedEvent is null
      Hologram​(org.bukkit.Location location, java.lang.String text)
      Create a Hologram Shows to all, TimedEvent is null
      Hologram​(org.bukkit.Location location, java.lang.String text, TimedEvent timedEvent)
      Create a Hologram Shows to all, Doesn't start Timed Event
      Hologram​(org.bukkit.Location location, java.lang.String text, TimedEvent timedEvent, boolean startTimedEvent)
      Create a Hologram Shows to all
      Hologram​(org.bukkit.Location location, java.util.List<java.lang.String> text)
      Create a Hologram Shows to all, TimedEvent is null
      Hologram​(org.bukkit.Location location, java.util.List<java.lang.String> text, TimedEvent timedEvent)
      Create a Hologram Shows to all, Doesn't start TimedEvent
      Hologram​(org.bukkit.Location location, java.util.List<java.lang.String> text, TimedEvent timedEvent, boolean startTimedEvent)
      Create a Hologram Shows to all
    • Constructor Detail

      • Hologram

        public Hologram​(org.bukkit.Location location)
        Create a Hologram Shows to all, TimedEvent is null
        Parameters:
        location - The location for the hologram line
      • Hologram

        public Hologram​(org.bukkit.Location location,
                        java.lang.String text)
        Create a Hologram Shows to all, TimedEvent is null
        Parameters:
        location - The location for the hologram line
        text - The text for the hologram line as a String
      • Hologram

        public Hologram​(org.bukkit.Location location,
                        java.util.List<java.lang.String> text)
        Create a Hologram Shows to all, TimedEvent is null
        Parameters:
        location - The location for the hologram line
        text - The text for the hologram line as a List
      • Hologram

        public Hologram​(boolean showToAll,
                        org.bukkit.Location location,
                        java.lang.String text)
        Create a Hologram TimedEvent is null
        Parameters:
        showToAll - If the hologram is shown to all
        location - The location for the hologram line
        text - The text for the hologram line as a String
      • Hologram

        public Hologram​(boolean showToAll,
                        org.bukkit.Location location,
                        java.util.List<java.lang.String> text)
        Create a Hologram TimedEvent is null
        Parameters:
        showToAll - If the hologram is shown to all
        location - The location for the hologram line
        text - The text for the hologram line as a List
      • Hologram

        public Hologram​(boolean showToAll,
                        org.bukkit.Location location,
                        java.lang.String text,
                        TimedEvent timedEvent)
        Create a Hologram Doesn't start TimedEvent
        Parameters:
        showToAll - If the hologram is shown to all
        location - The location for the hologram line
        text - The text for the hologram line as a String
        timedEvent - The timed event to run
      • Hologram

        public Hologram​(boolean showToAll,
                        org.bukkit.Location location,
                        java.util.List<java.lang.String> text,
                        TimedEvent timedEvent)
        Create a Hologram Doesn't start TimedEvent
        Parameters:
        showToAll - If the hologram is shown to all
        location - The location for the hologram line
        text - The text for the hologram line as a List
        timedEvent - The timed event to run
      • Hologram

        public Hologram​(org.bukkit.Location location,
                        java.util.List<java.lang.String> text,
                        TimedEvent timedEvent)
        Create a Hologram Shows to all, Doesn't start TimedEvent
        Parameters:
        location - The location for the hologram line
        text - The text for the hologram line as a List
        timedEvent - The timed event to run
      • Hologram

        public Hologram​(org.bukkit.Location location,
                        java.lang.String text,
                        TimedEvent timedEvent)
        Create a Hologram Shows to all, Doesn't start Timed Event
        Parameters:
        location - The location for the hologram line
        text - The text for the hologram line as a String
        timedEvent - The timed event to run
      • Hologram

        public Hologram​(org.bukkit.Location location,
                        java.lang.String text,
                        TimedEvent timedEvent,
                        boolean startTimedEvent)
        Create a Hologram Shows to all
        Parameters:
        location - The location for the hologram line
        text - The text for the hologram line as a String
        timedEvent - The timed event to run
        startTimedEvent - If timed even is starting right away
      • Hologram

        public Hologram​(org.bukkit.Location location,
                        java.util.List<java.lang.String> text,
                        TimedEvent timedEvent,
                        boolean startTimedEvent)
        Create a Hologram Shows to all
        Parameters:
        location - The location for the hologram line
        text - The text for the hologram line as a List
        timedEvent - The timed event to run
        startTimedEvent - If timed even is starting right away
      • Hologram

        public Hologram​(boolean showToAll,
                        org.bukkit.Location location,
                        java.lang.String text,
                        TimedEvent timedEvent,
                        boolean startTimedEvent)
        Create a Hologram
        Parameters:
        showToAll - If the hologram is shown to all
        location - The location for the hologram line
        text - The text for the hologram line as a String
        timedEvent - The timed event to run
        startTimedEvent - If timed even is starting right away
      • Hologram

        public Hologram​(boolean showToAll,
                        org.bukkit.Location location,
                        java.util.List<java.lang.String> text,
                        TimedEvent timedEvent,
                        boolean startTimedEvent)
        Create a Hologram
        Parameters:
        showToAll - If the hologram is shown to all
        location - The location for the hologram line
        text - The text for the hologram line as a List
        timedEvent - The timed event to run
        startTimedEvent - If timed even is starting right away
    • Method Detail

      • getViewer

        public Viewer getViewer()
        Gets viewer.
        Returns:
        Get the Viewer
      • getHologramLines

        public java.util.List<HologramLine> getHologramLines()
        Gets hologram lines.
        Returns:
        Get the list of HologramLines
      • getLocation

        public org.bukkit.Location getLocation()
        Gets location.
        Returns:
        Get the Location
      • setText

        public Hologram setText​(int line,
                                java.lang.String text,
                                TimedEvent timedEvent)
        Set the text of line x and attach a TimedEvent Doesn't auto-start the TimedEvent Calls setText(int, String, TimedEvent, boolean)
        Parameters:
        line - The line number
        text - The text
        timedEvent - The TimedEvent
        Returns:
        The Hologram
      • setText

        public Hologram setText​(int line,
                                java.lang.String text,
                                TimedEvent timedEvent,
                                boolean timedEventAutoStart)
        Set the text of line x and attach a TimedEvent and say if it auto-starts
        Parameters:
        line - The line number
        text - The text
        timedEvent - The TimedEvent
        timedEventAutoStart - If the TimedEvent auto-starts
        Returns:
        The Hologram
      • setHologramLine

        public Hologram setHologramLine​(int line,
                                        java.lang.String text)
        Sets hologram line.
        Parameters:
        line - the line
        text - the text
        Returns:
        the hologram line
      • setHologramLine

        public Hologram setHologramLine​(int line,
                                        java.lang.String text,
                                        TimedEvent timedEvent)
        Sets hologram line.
        Parameters:
        line - the line
        text - the text
        timedEvent - the timed event
        Returns:
        the hologram line
      • setHologramLine

        public Hologram setHologramLine​(int line,
                                        java.lang.String text,
                                        TimedEvent timedEvent,
                                        boolean startTimedEvent)
        Sets hologram line.
        Parameters:
        line - the line
        text - the text
        timedEvent - the timed event
        startTimedEvent - the start timed event
        Returns:
        the hologram line
      • addText

        public Hologram addText​(java.lang.String text,
                                TimedEvent timedEvent)
        Add text to the hologram with an attached TimedEvent TimedEvent doesn't auto-start Calls addText(String, TimedEvent, boolean)
        Parameters:
        text - The text
        timedEvent - The TimedEvent
        Returns:
        The hologram
      • addText

        public Hologram addText​(java.lang.String text,
                                TimedEvent timedEvent,
                                boolean startTimedEvent)
        Add text to the hologram with an attached TimedEvent and saying if it auto-starts
        Parameters:
        text - The text
        timedEvent - The TimedEvent
        startTimedEvent - If the TimedEvent auto-starts
        Returns:
        The Hologram
      • addBlankLine

        public Hologram addBlankLine()
        Add a blank line to the Hologram
        Returns:
        The Hologram
      • showPlayer

        public void showPlayer​(org.bukkit.entity.Player player)
        Show the hologram to a player Calls showPlayer(String)
        Parameters:
        player - The player
      • showPlayer

        public void showPlayer​(java.lang.String player)
        Show the hologram to a player
        Parameters:
        player - The player's name
      • remove

        public void remove()
        Remove the hologram and all the lines
      • remove

        public void remove​(java.lang.String player)
        Remove the hologram from a player
        Parameters:
        player - The player
      • remove

        public void remove​(org.bukkit.entity.Player player)
        Remove the hologram from a player
        Parameters:
        player - The player's name