From 8b358b0955025de8f77faeb4e5bff0eebd1038b0 Mon Sep 17 00:00:00 2001 From: Jeremy Wood Date: Thu, 31 Jan 2019 22:03:11 -0500 Subject: [PATCH] Don't send mvv url response to console twice when run from console. --- .../onarandombox/MultiverseCore/commands/VersionCommand.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/VersionCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/VersionCommand.java index e3f16742..95013ca5 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/VersionCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/VersionCommand.java @@ -18,6 +18,7 @@ import com.onarandombox.MultiverseCore.utils.webpaste.PasteServiceType; import com.onarandombox.MultiverseCore.utils.webpaste.URLShortener; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; +import org.bukkit.command.ConsoleCommandSender; import org.bukkit.entity.Player; import org.bukkit.permissions.PermissionDefault; import org.bukkit.scheduler.BukkitRunnable; @@ -170,7 +171,9 @@ public class VersionCommand extends MultiverseCommand { return; } - sender.sendMessage("Version info dumped here: " + ChatColor.GREEN + pasteUrl); + if (!(sender instanceof ConsoleCommandSender)) { + sender.sendMessage("Version info dumped here: " + ChatColor.GREEN + pasteUrl); + } Logging.info("Version info dumped here: %s", pasteUrl); } }