Interface ClientSelectionUtils


  • public interface ClientSelectionUtils
    Utilities to select entities on the client side, e.g. showing zebra effect You can access the corresponding bean implementation via EngineFacade::getBusinessObject
    • Method Detail

      • getSelectionByLocalPlayer

        ViewPortEntitySelectionEvent getSelectionByLocalPlayer()
        Get details about the entity selection by the player using the local game client
      • select

        ViewPortEntitySelectionEvent select​(UUID compositeEntityId,
                                            UUID entityId,
                                            UUID playerId,
                                            boolean validateSelection,
                                            boolean publish)
        Select an entity
        Parameters:
        validateSelection - Recommended, validates whether the entity can be selected, e.g. it's not selected by another player already and belongs to the local ship
        publish - Recommended, publish changed selection to other players
      • selectByCategories

        void selectByCategories​(List<String> categories)
        Selects the first entity by the given entity categories. Calling it multiple times cycles through entites. See also EntityDefCategoryBuiltinTypes
      • isSelected

        boolean isSelected​(UUID entityId)
        Checks whether a certain entity is selected by any player
      • publishEntitySelection

        void publishEntitySelection​(ViewPortEntitySelectionEvent viewPortEntitySelectionEvent)
        Sends the current entity selection to other players
      • publishEntitySelection

        void publishEntitySelection​(UUID compositeEntityId,
                                    UUID entityId,
                                    boolean select)
        Sends the current entity selection to other players
      • invalidateLocalPlayerSpaceshipEntitySelection

        void invalidateLocalPlayerSpaceshipEntitySelection​(boolean publish,
                                                           boolean onlyIfConfigured)
        Deselects the entity that is currently selected by the local player