From 86e95527679f45fc06463c3719babafae7ad8b00 Mon Sep 17 00:00:00 2001 From: levischnorr Date: Thu, 25 Jan 2024 14:28:53 +0100 Subject: [PATCH] Send GameConfig to player on command execution --- .../main/java/mavenmcserver/command/CommandTicTacToe.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mavenmcserver/src/main/java/mavenmcserver/command/CommandTicTacToe.java b/mavenmcserver/src/main/java/mavenmcserver/command/CommandTicTacToe.java index fb6a4a2..622d439 100644 --- a/mavenmcserver/src/main/java/mavenmcserver/command/CommandTicTacToe.java +++ b/mavenmcserver/src/main/java/mavenmcserver/command/CommandTicTacToe.java @@ -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 { @@ -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;