Skip to content

Commit

Permalink
Ensure the player name in the step definition is valid (#8384)
Browse files Browse the repository at this point in the history
  • Loading branch information
trevan authored Dec 9, 2020
1 parent 01f2ed4 commit 2485dec
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,16 @@ private void parseSteps(final List<GamePlay.Sequence.Step> stepList) throws Game
for (final GamePlay.Sequence.Step current : stepList) {
final IDelegate delegate = getDelegate(current.getDelegate());
final GamePlayer player = getPlayerIdOptional(current.getPlayer()).orElse(null);
if (player == null && current.getPlayer() != null && !current.getPlayer().isBlank()) {
log.log(
Level.SEVERE,
"The step "
+ current.getName()
+ " wants a player with the name of '"
+ current.getPlayer()
+ "' but that player can not be found. "
+ "Make sure the player's name is spelled correctly.");
}
final String name = current.getName();
String displayName = null;
final Properties stepProperties = parseStepProperties(current.getStepProperties());
Expand Down

0 comments on commit 2485dec

Please sign in to comment.