diff --git a/Projekte/mdga/client/src/main/java/pp/mdga/client/NotificationSynchronizer.java b/Projekte/mdga/client/src/main/java/pp/mdga/client/NotificationSynchronizer.java index 7fb06091..c4d366ee 100644 --- a/Projekte/mdga/client/src/main/java/pp/mdga/client/NotificationSynchronizer.java +++ b/Projekte/mdga/client/src/main/java/pp/mdga/client/NotificationSynchronizer.java @@ -133,8 +133,7 @@ private void handleGame(Notification notification) { app.getAcousticHandler().playSound(MdgaSound.UI90); delay = STANDARD_DELAY; } else if (notification instanceof CeremonyNotification ceremonyNotification) { - app.enter(MdgaState.CEREMONY); - CeremonyView ceremonyView = (CeremonyView) app.getView(); + CeremonyView ceremonyView = app.ceremonyView; int size = ceremonyNotification.getNames().size(); if (ceremonyNotification.getPiecesThrown().size() != size || @@ -162,6 +161,7 @@ private void handleGame(Notification notification) { ceremonyView.addStatisticsRow(name, v1, v2, v3, v4, v5, v6); } + app.enter(MdgaState.CEREMONY); } else if (notification instanceof DiceNowNotification) { guiHandler.hideText(); guiHandler.showDice(); diff --git a/Projekte/mdga/client/src/main/java/pp/mdga/client/view/CeremonyView.java b/Projekte/mdga/client/src/main/java/pp/mdga/client/view/CeremonyView.java index 794ac270..bdeee279 100644 --- a/Projekte/mdga/client/src/main/java/pp/mdga/client/view/CeremonyView.java +++ b/Projekte/mdga/client/src/main/java/pp/mdga/client/view/CeremonyView.java @@ -205,7 +205,7 @@ public void addCeremonyParticipant(Color color, int pos, String name) { ceremonyButtons.add(button); - if (state.equals(SubState.AWARD_CEREMONY)) { + if (state != null && state.equals(SubState.AWARD_CEREMONY)) { button.hide(); button.show(); }