private EventHandler<MouseEvent> createAuctionShipAction(final VBox container, IGuild guild, DecoratedText text, ItemNavigator<IShip> itemNavigator, Group centerPane, Pane action) {
return event -> {
try {
container.getChildren().removeAll(text, centerPane, action);
getContent().removeAll(text, centerPane, action);
LocalDateTime auctionDate = date.getCurrentDate().plusDays(10);
auctionDate = guildService.cleanUpAuctionAndDetermineAuctionDate(auctionDate, guild);
IShip ship = itemNavigator.getCurrent();
IShipAuction auction = modelFactory.createShipAuction(auctionDate, ship.getValue(), city.getPlayer(), ship);
city.getPlayer().removeShip(ship);
guild.getAuctions().add(auction);
} catch (RuntimeException e) {
logger.error("Failed to set ship for auctioning", e);
}
};
}