public interface NucleusBackService
A subject's last location may not be set. It is not saved across server restarts, and may be discarded at any time the user is not online.
Modifier and Type | Method and Description |
---|---|
Optional<org.spongepowered.api.entity.Transform<org.spongepowered.api.world.World>> |
getLastLocation(org.spongepowered.api.entity.living.player.User user)
Gets the location of the subject before they executed the last warp that was marked as Returnable.
|
boolean |
isLoggingLastLocation(org.spongepowered.api.entity.living.player.User user)
Gets a value indicating whether the user will have their last location logged.
|
void |
removeLastLocation(org.spongepowered.api.entity.living.player.User user)
Removes the last location from the subject, so that /back will not work for them.
|
void |
setLastLocation(org.spongepowered.api.entity.living.player.User user,
org.spongepowered.api.entity.Transform<org.spongepowered.api.world.World> location)
Sets the location that the subject will be warped to if they execute /back
|
void |
setLoggingLastLocation(org.spongepowered.api.entity.living.player.User user,
boolean log)
Sets whether the user will have their last location logged.
|
Optional<org.spongepowered.api.entity.Transform<org.spongepowered.api.world.World>> getLastLocation(org.spongepowered.api.entity.living.player.User user)
user
- The User
Optional
containing the Transform
void setLastLocation(org.spongepowered.api.entity.living.player.User user, org.spongepowered.api.entity.Transform<org.spongepowered.api.world.World> location)
user
- The User
location
- The Location
to set as the /back target.void removeLastLocation(org.spongepowered.api.entity.living.player.User user)
user
- The User
boolean isLoggingLastLocation(org.spongepowered.api.entity.living.player.User user)
user
- The User
true
if it is being logged.void setLoggingLastLocation(org.spongepowered.api.entity.living.player.User user, boolean log)
user
- The User
log
- Whether to log the user's last location.