Skip to content

Commit

Permalink
Send GameConfig to player on command execution
Browse files Browse the repository at this point in the history
  • Loading branch information
lscgh committed Jan 25, 2024
1 parent a481259 commit 86e9552
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
if(args[0].equals(noAvailablePlayersPlaceholder[0]) && args[1].equals(noAvailablePlayersPlaceholder[1]) && args[2].equals(noAvailablePlayersPlaceholder[2])) return true;
}

sender.sendMessage("You just executed /tictactoe correctly");

GameConfig config;

try {
Expand All @@ -68,6 +66,11 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
return true;
}

sender.sendMessage("You just executed /tictactoe correctly");
sender.sendMessage("Opponent player name: '" + config.opponentPlayer.getName() + "'");
sender.sendMessage("Game size: " + config.size);
sender.sendMessage("WinRequiredAmount: " + config.winRequiredAmount);

}

boolean shouldShowUsage = args.length <= 0;
Expand Down

0 comments on commit 86e9552

Please sign in to comment.