Class ModifiableEvent<T>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T getValue()
      Returns the current value.
      boolean isStopped()
      Checks if the event was stopped.
      void setValue​(T x)
      Sets the value of the Event.
      void stop()
      Stops the event, meaning any further modifications will be impossible.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ModifiableEvent

        public ModifiableEvent​(PerkUser player,
                               T value)
    • Method Detail

      • getValue

        public T getValue()
        Returns the current value.
        Returns:
        The value of the Event
      • setValue

        public void setValue​(T x)
        Sets the value of the Event. Should be used with getValue() in order to apply percentages. Only modifies the value if the event is not stopped.
        Parameters:
        x - The new value
      • stop

        public final void stop()
        Stops the event, meaning any further modifications will be impossible.
      • isStopped

        public final boolean isStopped()
        Checks if the event was stopped.
        Returns:
        True if the event was stopped.