Package org.ships.vessel.common.assits
Interface CrewStoredVessel
- All Superinterfaces:
org.core.world.position.Positionable<org.core.world.position.impl.BlockPosition>
,Vessel
- All Known Subinterfaces:
ShipsVessel
- All Known Implementing Classes:
AbstractShipsVessel
,Airship
,Marsship
,OPShip
,Plane
,Submarine
,WaterShip
specifies that the implementation of the vessel has crew with different roles
-
Method Summary
Modifier and TypeMethodDescriptiongetCrew()
Gets the crew of the shipGets all the users uuids with permissiongetCrew
(CrewPermission permission) Gets all the users uuids with permissionGets the default crew permission for if the user who interacts with the ship is not specified within the map value above.default CrewPermission
getPermission
(UUID user) Gets the permission of the user.default Set<org.core.entity.living.human.player.User>
getUserCrew
(String permissionId) Gets all the users with a permission.default Set<org.core.entity.living.human.player.User>
getUserCrew
(CrewPermission permission) Gets all the users with a permission.Methods inherited from interface org.ships.vessel.common.types.Vessel
get, getAltitudeSpeed, getCachedName, getEntities, getEntities, getEntities, getEntitiesAsynced, getEntitiesAsynced, getEntitiesOvertime, getEntitiesOvertime, getMaxSpeed, getName, getPosition, getStructure, getType, getValue, getWaterLevel, getWaterLevel, isAltitudeSpeedSpecified, isLoading, isMaxSpeedSpecified, moveTo, moveTowards, moveTowards, rotateAnticlockwiseAround, rotateClockwiseAround, rotateLeftAround, rotateRightAround, save, set, set, setAltitudeSpeed, setLoading, setMaxSpeed, setStructure, updateStructure, updateStructure
-
Method Details
-
getCrew
Map<UUID,CrewPermission> getCrew()Gets the crew of the ship- Returns:
- a Map value containing the UUID of the player and their permission status
-
getDefaultPermission
CrewPermission getDefaultPermission()Gets the default crew permission for if the user who interacts with the ship is not specified within the map value above. This is not to be granted to the player in the map.- Returns:
- the default permission
-
getPermission
Gets the permission of the user. Note that it will default to the default permission if no user was found- Parameters:
user
- The player in question- Returns:
- The permission the user has on this ship
-
getUserCrew
Gets all the users with a permission.- Parameters:
permission
- The permission- Returns:
- The users with the specific permission
-
getUserCrew
Gets all the users with a permission.- Parameters:
permissionId
- The permission- Returns:
- The users with the specific permission
-
getCrew
Gets all the users uuids with permission- Parameters:
permission
- The permission- Returns:
- The users uuids ith the specific permission
-
getCrew
Gets all the users uuids with permission- Parameters:
permissionId
- The permission- Returns:
- The users uuids ith the specific permission
-