Package de.extio.spacecraft.shared.bo
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ViewPortEntitySelectionEvent
getSelectionByEntityId(UUID entityId)
Get details about an entity selection by entity idViewPortEntitySelectionEvent
getSelectionByLocalPlayer()
Get details about the entity selection by the player using the local game clientViewPortEntitySelectionEvent
getSelectionByPlayerId(UUID playerId)
Get details about an entity selection by player idvoid
invalidateLocalPlayerSpaceshipEntitySelection(boolean publish, boolean onlyIfConfigured)
Deselects the entity that is currently selected by the local playerboolean
isSelected(UUID entityId)
Checks whether a certain entity is selected by any playervoid
publishEntitySelection(ViewPortEntitySelectionEvent viewPortEntitySelectionEvent)
Sends the current entity selection to other playersvoid
publishEntitySelection(UUID compositeEntityId, UUID entityId, boolean select)
Sends the current entity selection to other playersViewPortEntitySelectionEvent
select(UUID compositeEntityId, UUID entityId, UUID playerId, boolean validateSelection, boolean publish)
Select an entityvoid
selectByCategories(List<String> categories)
Selects the first entity by the given entity categories.
-
-
-
Method Detail
-
getSelectionByEntityId
ViewPortEntitySelectionEvent getSelectionByEntityId(UUID entityId)
Get details about an entity selection by entity id
-
getSelectionByLocalPlayer
ViewPortEntitySelectionEvent getSelectionByLocalPlayer()
Get details about the entity selection by the player using the local game client
-
getSelectionByPlayerId
ViewPortEntitySelectionEvent getSelectionByPlayerId(UUID playerId)
Get details about an entity selection by player id
-
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 shippublish
- 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
-
-