Search in sources :

Example 1 with RespawnService

use of com.skelril.skree.service.RespawnService in project Skree by Skelril.

the class ZoneMasterOrb method saveLocation.

private void saveLocation(Player player) {
    RespawnService respawnService = Sponge.getServiceManager().provideUnchecked(RespawnService.class);
    respawnService.push(player, player.getLocation());
}
Also used : RespawnService(com.skelril.skree.service.RespawnService)

Example 2 with RespawnService

use of com.skelril.skree.service.RespawnService in project Skree by Skelril.

the class LegacyZoneBase method remove.

@Override
public Clause<Player, ZoneStatus> remove(Player player) {
    RespawnService respawnService = Sponge.getServiceManager().provideUnchecked(RespawnService.class);
    Location<World> newLocation = respawnService.pop(player).orElse(respawnService.getDefault(player));
    player.setLocation(newLocation);
    return new Clause<>(player, ZoneStatus.REMOVED);
}
Also used : RespawnService(com.skelril.skree.service.RespawnService) Clause(com.skelril.nitro.Clause) World(org.spongepowered.api.world.World)

Example 3 with RespawnService

use of com.skelril.skree.service.RespawnService in project Skree by Skelril.

the class ZoneTransitionalOrb method saveLocation.

private void saveLocation(Player player, Location<World> location) {
    RespawnService respawnService = Sponge.getServiceManager().provideUnchecked(RespawnService.class);
    respawnService.push(player, location);
}
Also used : RespawnService(com.skelril.skree.service.RespawnService)

Aggregations

RespawnService (com.skelril.skree.service.RespawnService)3 Clause (com.skelril.nitro.Clause)1 World (org.spongepowered.api.world.World)1