use of com.skelril.skree.service.PlayerStateService in project Skree by Skelril.
the class JungleRaidInstance method tryInventoryRestore.
public void tryInventoryRestore(Player player) {
Optional<PlayerStateService> optService = Sponge.getServiceManager().provide(PlayerStateService.class);
if (optService.isPresent()) {
PlayerStateService service = optService.get();
service.loadInventoryIfStored(player);
}
}
use of com.skelril.skree.service.PlayerStateService in project Skree by Skelril.
the class SkyWarsInstance method remove.
@Override
public Clause<Player, ZoneStatus> remove(Player player) {
player.offer(Keys.FALL_DISTANCE, 0F);
playerLost(player);
Optional<PlayerStateService> optService = Sponge.getServiceManager().provide(PlayerStateService.class);
if (optService.isPresent()) {
PlayerStateService service = optService.get();
service.loadInventoryIfStored(player);
}
return super.remove(player);
}
Aggregations