diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/events/EventBuilder.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/events/EventBuilder.java index 89a6ad9..a893b94 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/events/EventBuilder.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/events/EventBuilder.java @@ -5,6 +5,7 @@ import uulm.teamname.marvelous.gamelibrary.entities.Entity; import uulm.teamname.marvelous.gamelibrary.entities.EntityID; import uulm.teamname.marvelous.gamelibrary.entities.StoneType; +import java.util.Arrays; import java.util.HashMap; /** @@ -46,12 +47,12 @@ public class EventBuilder { private String teamIdentifier; private HashMap customContent; - /** - * Creates a new {@link EventBuilder} used for building {@link Event}s - */ - public EventBuilder() { - - } +// /** +// * Creates a new {@link EventBuilder} used for building {@link Event}s +// */ +// public EventBuilder() { +// +// } /** @@ -318,11 +319,14 @@ public class EventBuilder { * @throws IllegalStateException meaning that the event is non-valid for the current builder state */ private void throwException() throws IllegalStateException { - throw new IllegalStateException("Properties malformed for " + this.type); + throw new IllegalStateException("Properties malformed for " + this.type + ".\n" + + "Builder properties: " + this.notNullToString()); } /** - * Builds a generic {@link GameEvent} from the values given to the builder + * Builds a generic {@link GameEvent} from the values given to the builder. + * This method checks for the correctness of the event before building it. If this is not desired, + * use the {@link #buildGameEventUnchecked()} method instead *