Interface AffectEntityEvent

    • Method Detail

      • entitySnapshots

        java.util.List<EntitySnapshot> entitySnapshots()
                                                throws java.lang.IllegalStateException
        Gets an List of the entity data un-affected by event changes.

        This method MUST be called at Order.PRE in order to be properly initialized, after which it can be called at any time. If it is not first called at Order.PRE, it will throw an IllegalStateException when invoked.

        Returns:
        The ImmutableList
        Throws:
        java.lang.IllegalStateException - If the method is called after the pre order
      • entities

        java.util.List<Entity> entities()
        Gets the List of entities who will be affected after event resolution. This list can only be modified using filterEntities(Predicate).
        Returns:
        The list of entities that will be affected.
      • filterEntityLocations

        default void filterEntityLocations​(java.util.function.Predicate<ServerLocation> predicate)
        Filters out ServerLocation's from entities() to be affected by this event.

        Locations for which the predicate returns false will be removed from entities().

        Parameters:
        predicate - The predicate to use for filtering
      • filterEntities

        void filterEntities​(java.util.function.Predicate<Entity> predicate)
        Filters out Entity's from entities() to be affected by this event.

        Entities for which the predicate returns false will be removed from entities().

        Parameters:
        predicate - The predicate to use for filtering