Package de.extio.spacecraft.shared.bo
Interface ClientSelectionUtils
-
public interface ClientSelectionUtilsUtilities 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 ViewPortEntitySelectionEventgetSelectionByEntityId(UUID entityId)Get details about an entity selection by entity idViewPortEntitySelectionEventgetSelectionByLocalPlayer()Get details about the entity selection by the player using the local game clientViewPortEntitySelectionEventgetSelectionByPlayerId(UUID playerId)Get details about an entity selection by player idvoidinvalidateLocalPlayerSpaceshipEntitySelection(boolean publish, boolean onlyIfConfigured)Deselects the entity that is currently selected by the local playerbooleanisSelected(UUID entityId)Checks whether a certain entity is selected by any playervoidpublishEntitySelection(ViewPortEntitySelectionEvent viewPortEntitySelectionEvent)Sends the current entity selection to other playersvoidpublishEntitySelection(UUID compositeEntityId, UUID entityId, boolean select)Sends the current entity selection to other playersViewPortEntitySelectionEventselect(UUID compositeEntityId, UUID entityId, UUID playerId, boolean validateSelection, boolean publish)Select an entityvoidselectByCategories(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
-
-