diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml
index d1829a8c..8d500156 100644
--- a/.github/workflows/build-and-release.yml
+++ b/.github/workflows/build-and-release.yml
@@ -61,6 +61,7 @@ jobs:
run: |
echo '' >> ${{ env.assembly-info }}
echo "[assembly: AssemblyConfiguration(\"GitHub build ${{ github.run_number }}, built on ${{ env.date_dashed }} from commit ${{ env.commit }}\")]" >> ${{ env.assembly-info }}
+ sed -i -e 's|SentryDSN = "";|SentryDSN = "${{ secrets.SENTRY_DSN }}";|g' ${{ env.project-path }}/Program.cs
- name: Build Target
run: dotnet publish ${{ env.project-path }}.sln -f ${{ env.target-version }} -r ${{ matrix.target }} ${{ env.compile-flags }}
@@ -177,6 +178,7 @@ jobs:
run: |
echo '' >> ${{ env.assembly-info }}
echo "[assembly: AssemblyConfiguration(\"GitHub build ${{ github.run_number }}, built on ${{ env.date_dashed }} from commit ${{ env.commit }}\")]" >> ${{ env.assembly-info }}
+ sed -i -e 's|SentryDSN = "";|SentryDSN = "${{ secrets.SENTRY_DSN }}";|g' ${{ env.project-path }}/Program.cs
- name: Build Target
run: dotnet publish ${{ env.project-path }}.sln -f ${{ env.target-version }} -r ${{ matrix.target }} ${{ env.compile-flags }}
@@ -195,12 +197,22 @@ jobs:
filePath: ${{ env.target-out-path }}/mcc-${{ matrix.target }}.zip
assetName: ${{ env.PROJECT }}-${{ (contains(matrix.target, 'linux-x64') && 'linux.zip') || (contains(matrix.target, 'win-x86') && 'windows-x86.zip') || (contains(matrix.target, 'win-x64') && 'windows-x64.zip') || (contains(matrix.target, 'linux-arm64') && 'linux-arm64.zip') || (contains(matrix.target, 'osx-x64') && 'osx.zip') }}
tag: ${{ format('{0}-{1}', env.date, github.run_number) }}
-
+
+ - name: Sentry Release
+ uses: getsentry/action-release@v1.7.0
+ env:
+ SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
+ SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
+ SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
+ with:
+ environment: production
+ dist: ${{ format('{0}-{1}', env.date, github.run_number) }}
+
determine-build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
- if: ${{ !contains(github.event.head_commit.message, 'skip')}}
+ if: ${{ !contains(github.event.head_commit.message, 'skip') || !contains(github.event.head_commit.message, 'skipci')}}
steps:
- name: dummy action
run: "echo 'dummy action that checks if the build is to be skipped, if it is, this action does not run to break the entire build action'"
diff --git a/MinecraftClient/CommandHandler/CmdResult.cs b/MinecraftClient/CommandHandler/CmdResult.cs
index 4be40a4a..8ecafc8a 100644
--- a/MinecraftClient/CommandHandler/CmdResult.cs
+++ b/MinecraftClient/CommandHandler/CmdResult.cs
@@ -22,7 +22,7 @@ namespace MinecraftClient.CommandHandler
public CmdResult()
{
this.status = Status.NotRun;
- this.result = null;
+ this.result = "Command did not run, cannot determine the result of the command.";
}
public Status status;
@@ -35,7 +35,7 @@ namespace MinecraftClient.CommandHandler
this.result = status switch
{
#pragma warning disable format // @formatter:off
- Status.NotRun => null,
+ Status.NotRun => "Command did not run, cannot determine the result of the command.",
Status.FailChunkNotLoad => null,
Status.FailNeedEntity => Translations.extra_entity_required,
Status.FailNeedInventory => Translations.extra_inventory_required,
diff --git a/MinecraftClient/McClient.cs b/MinecraftClient/McClient.cs
index 35cc97e4..f7775564 100644
--- a/MinecraftClient/McClient.cs
+++ b/MinecraftClient/McClient.cs
@@ -21,6 +21,7 @@ using MinecraftClient.Protocol.ProfileKey;
using MinecraftClient.Protocol.Session;
using MinecraftClient.Proxy;
using MinecraftClient.Scripting;
+using Sentry;
using static MinecraftClient.Settings;
namespace MinecraftClient
@@ -199,6 +200,33 @@ namespace MinecraftClient
Log.WarnEnabled = Config.Logging.WarningMessages;
Log.ErrorEnabled = Config.Logging.ErrorMessages;
+ // SENTRY: Send our client version and server version to Sentry
+ SentrySdk.ConfigureScope(scope =>
+ {
+ scope.SetTag("Protocol Version", protocolversion.ToString());
+ scope.SetTag("Minecraft Version", ProtocolHandler.ProtocolVersion2MCVer(protocolversion));
+ scope.SetTag("MCC Build", Program.BuildInfo == null ? "Debug" : Program.BuildInfo);
+
+ if (forgeInfo != null)
+ scope.SetTag("Forge Version", forgeInfo?.Version.ToString());
+
+ scope.Contexts["Server Information"] = new
+ {
+ ProtocolVersion = protocolversion,
+ MinecraftVersion = ProtocolHandler.ProtocolVersion2MCVer(protocolversion),
+ ForgeInfo = forgeInfo?.Version
+ };
+
+ scope.Contexts["Client Configuration"] = new
+ {
+ TerrainAndMovementsEnabled = terrainAndMovementsEnabled,
+ InventoryHandlingEnabled = inventoryHandlingEnabled,
+ EntityHandlingEnabled = entityHandlingEnabled
+ };
+ });
+
+ SentrySdk.StartSession();
+
/* Load commands from Commands namespace */
LoadCommands();
@@ -667,6 +695,8 @@ namespace MinecraftClient
}
}
+ SentrySdk.EndSession();
+
if (!will_restart)
{
ConsoleInteractive.ConsoleReader.StopReadThread();
diff --git a/MinecraftClient/MinecraftClient.csproj b/MinecraftClient/MinecraftClient.csproj
index cf999ca2..70470019 100644
--- a/MinecraftClient/MinecraftClient.csproj
+++ b/MinecraftClient/MinecraftClient.csproj
@@ -39,6 +39,7 @@
+
NU1701
diff --git a/MinecraftClient/Program.cs b/MinecraftClient/Program.cs
index c70d7c31..6ff4d63b 100644
--- a/MinecraftClient/Program.cs
+++ b/MinecraftClient/Program.cs
@@ -16,6 +16,7 @@ using MinecraftClient.Protocol.ProfileKey;
using MinecraftClient.Protocol.Session;
using MinecraftClient.Scripting;
using MinecraftClient.WinAPI;
+using Sentry;
using Tomlet;
using static MinecraftClient.Settings;
using static MinecraftClient.Settings.ConsoleConfigHealper.ConsoleConfig;
@@ -50,14 +51,31 @@ namespace MinecraftClient
public static readonly string? BuildInfo = null;
private static Tuple? offlinePrompt = null;
+ private static IDisposable _sentrySdk;
private static bool useMcVersionOnce = false;
private static string settingsIniPath = "MinecraftClient.ini";
+ // [SENTRY]
+ // Setting this string to an empty string will disable Sentry
+ private const string SentryDSN = "";
+
///
/// The main entry point of Minecraft Console Client
///
static void Main(string[] args)
{
+ // [SENTRY] Initialize Sentry SDK only if the DSN is not empty
+ if (SentryDSN != string.Empty) {
+ _sentrySdk = SentrySdk.Init(options =>
+ {
+ options.Dsn = SentryDSN;
+ options.AutoSessionTracking = true;
+ options.IsGlobalModeEnabled = true;
+ options.EnableTracing = true;
+ options.SendDefaultPii = false;
+ });
+ }
+
Task.Run(() =>
{
// "ToLower" require "CultureInfo" to be initialized on first run, which can take a lot of time.
@@ -139,6 +157,12 @@ namespace MinecraftClient
if (newlyGenerated)
ConsoleIO.WriteLineFormatted("§c" + Translations.mcc_settings_generated);
ConsoleIO.WriteLine(Translations.mcc_run_with_default_settings);
+
+ // Only show the Sentry message if the DSN is not empty
+ // as Sentry will not be initialized if the DSN is empty
+ if (SentryDSN != string.Empty) {
+ ConsoleIO.WriteLine(Translations.mcc_sentry_logging);
+ }
}
else if (!loadSucceed)
{
@@ -182,6 +206,9 @@ namespace MinecraftClient
ConsoleIO.WriteLine(string.Format(Translations.mcc_help_us_translate, Settings.TranslationProjectUrl));
WriteBackSettings(true); // format
}
+
+ if (!Config.Main.Advanced.EnableSentry)
+ _sentrySdk.Dispose();
}
//Other command-line arguments
@@ -632,6 +659,9 @@ namespace MinecraftClient
}
catch (Exception e)
{
+ // [SENTRY]
+ SentrySdk.CaptureException(e);
+
ConsoleIO.WriteLine(e.Message);
ConsoleIO.WriteLine(e.StackTrace ?? "");
HandleFailure(); // Other error
diff --git a/MinecraftClient/Protocol/Handlers/Protocol18.cs b/MinecraftClient/Protocol/Handlers/Protocol18.cs
index e089e78d..5a67294a 100644
--- a/MinecraftClient/Protocol/Handlers/Protocol18.cs
+++ b/MinecraftClient/Protocol/Handlers/Protocol18.cs
@@ -24,6 +24,7 @@ using MinecraftClient.Protocol.ProfileKey;
using MinecraftClient.Protocol.Session;
using MinecraftClient.Proxy;
using MinecraftClient.Scripting;
+using Sentry;
using static MinecraftClient.Settings;
using static MinecraftClient.Settings.MainConfigHelper.MainConfig.GeneralConfig;
@@ -371,6 +372,10 @@ namespace MinecraftClient.Protocol.Handlers
/// TRUE if the packet was processed, FALSE if ignored or unknown
internal bool HandlePacket(int packetId, Queue packetData)
{
+ // This copy is necessary because by the time we get to the catch block,
+ // the packetData queue will have been processed and the data will be lost
+ var _copy = packetData.ToArray();
+
try
{
switch (currentState)
@@ -487,7 +492,7 @@ namespace MinecraftClient.Protocol.Handlers
}
break;
-
+
case ConfigurationPacketTypesIn.RemoveResourcePack:
if (dataTypes.ReadNextBool(packetData)) // Has UUID
dataTypes.ReadNextUUID(packetData); // UUID
@@ -546,7 +551,7 @@ namespace MinecraftClient.Protocol.Handlers
innerException.InnerException is SocketException)
throw; //Thread abort or Connection lost rather than invalid data
- throw new System.IO.InvalidDataException(
+ var exception = new System.IO.InvalidDataException(
string.Format(Translations.exception_packet_process,
packetPalette.GetIncomingTypeById(packetId),
packetId,
@@ -554,6 +559,21 @@ namespace MinecraftClient.Protocol.Handlers
currentState == CurrentState.Login,
innerException.GetType()),
innerException);
+
+ SentrySdk.AddBreadcrumb(new Breadcrumb("S -> C Packet", "network", new Dictionary()
+ {
+ { "Packet ID", packetId.ToString() },
+ { "Packet Type ", packetPalette.GetIncomingTypeById(packetId).ToString() },
+ { "Protocol Version", protocolVersion.ToString() },
+ { "Minecraft Version", ProtocolHandler.ProtocolVersion2MCVer(protocolVersion) },
+ { "Current State", currentState.ToString() },
+ { "Packet Data", string.Join(" ", _copy.Select(b => b.ToString("X2"))) },
+ { "Inner Exception", innerException.GetType().ToString() }
+ }, "packet", BreadcrumbLevel.Error));
+
+ SentrySdk.CaptureException(exception);
+
+ throw exception;
}
return true;
@@ -4784,4 +4804,4 @@ namespace MinecraftClient.Protocol.Handlers
Play,
Transfer
}
-}
\ No newline at end of file
+}
diff --git a/MinecraftClient/Resources/ConfigComments/ConfigComments.Designer.cs b/MinecraftClient/Resources/ConfigComments/ConfigComments.Designer.cs
index 762b4d2e..65bb9a0b 100644
--- a/MinecraftClient/Resources/ConfigComments/ConfigComments.Designer.cs
+++ b/MinecraftClient/Resources/ConfigComments/ConfigComments.Designer.cs
@@ -1,7 +1,6 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -165,8 +164,8 @@ namespace MinecraftClient {
///
/// Looks up a localized string similar to Send a command on a regular or random basis or make the bot walk around randomly to avoid automatic AFK disconnection
- ////!\ Make sure your server rules do not forbid anti-AFK mechanisms!
- ////!\ Make sure you keep the bot in an enclosure to prevent it wandering off if you're using terrain handling! (Recommended size 5x5x5).
+ /// /!\ Make sure your server rules do not forbid anti-AFK mechanisms!
+ /// /!\ Make sure you keep the bot in an enclosure to prevent it wandering off if you're using terrain handling! (Recommended size 5x5x5).
///
internal static string ChatBot_AntiAfk {
get {
@@ -231,8 +230,8 @@ namespace MinecraftClient {
///
/// Looks up a localized string similar to Automatically attack hostile mobs around you
///You need to enable Entity Handling to use this bot
- ////!\ Make sure server rules allow your planned use of AutoAttack
- ////!\ SERVER PLUGINS may consider AutoAttack to be a CHEAT MOD and TAKE ACTION AGAINST YOUR ACCOUNT so DOUBLE CHECK WITH SERVER RULES!.
+ /// /!\ Make sure server rules allow your planned use of AutoAttack
+ /// /!\ SERVER PLUGINS may consider AutoAttack to be a CHEAT MOD and TAKE ACTION AGAINST YOUR ACCOUNT so DOUBLE CHECK WITH SERVER RULES!.
///
internal static string ChatBot_AutoAttack {
get {
@@ -501,7 +500,7 @@ namespace MinecraftClient {
/// Looks up a localized string similar to Automatically catch fish using a fishing rod
///Guide: https://mccteam.github.io/g/bots/#auto-fishing
///You can use "/fish" to control the bot manually.
- ////!\ Make sure server rules allow automated farming before using this bot.
+ /// /!\ Make sure server rules allow automated farming before using this bot.
///
internal static string ChatBot_AutoFishing {
get {
@@ -628,7 +627,7 @@ namespace MinecraftClient {
///
/// Looks up a localized string similar to Automatically relog when disconnected by server, for example because the server is restating
- ////!\ Use Ignore_Kick_Message=true at own risk! Server staff might not appreciate if you auto-relog on manual kicks.
+ /// /!\ Use Ignore_Kick_Message=true at own risk! Server staff might not appreciate if you auto-relog on manual kicks.
///
internal static string ChatBot_AutoRelog {
get {
@@ -675,7 +674,7 @@ namespace MinecraftClient {
///
/// Looks up a localized string similar to Run commands or send messages automatically when a specified pattern is detected in chat
///Server admins can spoof chat messages (/nick, /tellraw) so keep this in mind when implementing AutoRespond rules
- ////!\ This bot may get spammy depending on your rules, although the global messagecooldown setting can help you avoiding accidental spam.
+ /// /!\ This bot may get spammy depending on your rules, although the global messagecooldown setting can help you avoiding accidental spam.
///
internal static string ChatBot_AutoRespond {
get {
@@ -707,7 +706,7 @@ namespace MinecraftClient {
///Documentation: https://mccteam.github.io/g/bots/#discord-bridge
///Setup:
///First you need to create a Bot on the Discord Developers Portal, here is a video tutorial: https://www.youtube.com/watch?v=2FgMnZViNPA .
- ////!\ IMPORTANT /!\: When creating a bot, you MUST ENABLE "Message Content Intent", "Server Members Intent" and "Presence Intent [rest of string was truncated]";.
+ /// /!\ IMPORTANT /!\: When creating a bot, you MUST ENABLE "Message Content Intent", "Server Members Intent" and "Presence Intent [rest of string was truncated]";.
///
internal static string ChatBot_DiscordBridge {
get {
@@ -799,8 +798,7 @@ namespace MinecraftClient {
///NOTE: This is an experimental feature, the bot can be slow at times, you need to walk with a normal speed and to sometimes stop for it to be able to keep up with you
///It's similar to making animals follow you when you're holding food in your hand.
///This is due to a slow pathfinding algorithm, we're working on getting a better one
- ///You can tweak the update limit and find what works best for you. (NOTE: Do not but a very low one, because you might achieve the opposite,
- /// [rest of string was truncated]";.
+ ///You can tweak the update limit and find what works best for you. (NOTE: Do not but a very low one, because you might achieve the opposite,
/// [rest of string was truncated]";.
///
internal static string ChatBot_FollowPlayer {
get {
@@ -829,7 +827,7 @@ namespace MinecraftClient {
///
/// Looks up a localized string similar to A small game to demonstrate chat interactions. Players can guess mystery words one letter at a time.
///You need to have ChatFormat working correctly and add yourself in botowners to start the game with /tell <bot username> start
- ////!\ This bot may get a bit spammy if many players are interacting with it.
+ /// /!\ This bot may get a bit spammy if many players are interacting with it.
///
internal static string ChatBot_HangmanGame {
get {
@@ -903,7 +901,7 @@ namespace MinecraftClient {
///
/// Looks up a localized string similar to Relay messages between players and servers, like a mail plugin
///This bot can store messages when the recipients are offline, and send them when they join the server
- ////!\ Server admins can spoof PMs (/tellraw, /nick) so enable this bot only if you trust server admins.
+ /// /!\ Server admins can spoof PMs (/tellraw, /nick) so enable this bot only if you trust server admins.
///
internal static string ChatBot_Mailer {
get {
@@ -917,7 +915,7 @@ namespace MinecraftClient {
///The maps are rendered into Rendered_Maps folder if the Save_To_File is enabled.
///NOTE:
///If some servers have a very short time for solving captchas, enabe Auto_Render_On_Update to see them immediatelly in the console.
- ////!\ Make sure server rules allow bots to be used on the server, or you risk being punished..
+ /// /!\ Make sure server rules allow bots to be used on the server, or you risk being punished..
///
internal static string ChatBot_Map {
get {
@@ -1020,7 +1018,7 @@ namespace MinecraftClient {
///
/// Looks up a localized string similar to Send MCC console commands to your bot through server PMs (/tell)
///You need to have ChatFormat working correctly and add yourself in botowners to use the bot
- ////!\ Server admins can spoof PMs (/tellraw, /nick) so enable RemoteControl only if you trust server admins.
+ /// /!\ Server admins can spoof PMs (/tellraw, /nick) so enable RemoteControl only if you trust server admins.
///
internal static string ChatBot_RemoteControl {
get {
@@ -1031,7 +1029,7 @@ namespace MinecraftClient {
///
/// Looks up a localized string similar to Enable recording of the game (/replay start) and replay it later using the Replay Mod (https://www.replaymod.com/)
///Please note that due to technical limitations, the client player (you) will not be shown in the replay file
- ////!\ You SHOULD use /replay stop or exit the program gracefully with /quit OR THE REPLAY FILE MAY GET CORRUPT!.
+ /// /!\ You SHOULD use /replay stop or exit the program gracefully with /quit OR THE REPLAY FILE MAY GET CORRUPT!.
///
internal static string ChatBot_ReplayCapture {
get {
@@ -1060,7 +1058,7 @@ namespace MinecraftClient {
///
/// Looks up a localized string similar to This bot allows you to send and receive messages and commands via a Telegram Bot DM or to receive messages in a Telegram channel.
- ////!\ NOTE: You can't send messages and commands from a group channel, you can only send them in the bot DM, but you can get the messages from the client in a group channel.
+ /// /!\ NOTE: You can't send messages and commands from a group channel, you can only send them in the bot DM, but you can get the messages from the client in a group channel.
///-----------------------------------------------------------
///Setup:
///First you need to create a Telegram bot and obtain an API key, to do so, go to Telegram and find @botfather
@@ -1451,6 +1449,15 @@ namespace MinecraftClient {
}
}
+ ///
+ /// Looks up a localized string similar to Set to false to opt-out of Sentry error logging..
+ ///
+ internal static string Main_Advanced_enable_sentry {
+ get {
+ return ResourceManager.GetString("Main.Advanced.enable_sentry", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Toggle entity handling..
///
@@ -1844,7 +1851,7 @@ namespace MinecraftClient {
/// Looks up a localized string similar to Connect to a server via a proxy instead of connecting directly
///If Mojang session services are blocked on your network, set Enabled_Login=true to login using proxy.
///If the connection to the Minecraft game server is blocked by the firewall, set Enabled_Ingame=true to use a proxy to connect to the game server.
- ////!\ Make sure your server rules allow Proxies or VPNs before setting enabled=true, or you may face consequences!.
+ /// /!\ Make sure your server rules allow Proxies or VPNs before setting enabled=true, or you may face consequences!.
///
internal static string Proxy {
get {
@@ -2005,4 +2012,4 @@ namespace MinecraftClient {
}
}
}
-}
\ No newline at end of file
+}
diff --git a/MinecraftClient/Resources/ConfigComments/ConfigComments.resx b/MinecraftClient/Resources/ConfigComments/ConfigComments.resx
index 7e9e3b09..ca440314 100644
--- a/MinecraftClient/Resources/ConfigComments/ConfigComments.resx
+++ b/MinecraftClient/Resources/ConfigComments/ConfigComments.resx
@@ -852,4 +852,7 @@ If the connection to the Minecraft game server is blocked by the firewall, set E
Yggdrasil authlib server domain name and port.
+
+ Set to false to opt-out of Sentry error logging.
+
\ No newline at end of file
diff --git a/MinecraftClient/Resources/Translations/Translations.Designer.cs b/MinecraftClient/Resources/Translations/Translations.Designer.cs
index 7d4cd17b..af3da4ab 100644
--- a/MinecraftClient/Resources/Translations/Translations.Designer.cs
+++ b/MinecraftClient/Resources/Translations/Translations.Designer.cs
@@ -1,7 +1,6 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -5782,6 +5781,15 @@ namespace MinecraftClient {
}
}
+ ///
+ /// Looks up a localized string similar to MCC uses Sentry to log errors. You can opt-out by setting the EnableSentry option in the configuration file to false..
+ ///
+ internal static string mcc_sentry_logging {
+ get {
+ return ResourceManager.GetString("mcc.sentry_logging", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Server is in offline mode..
///
diff --git a/MinecraftClient/Resources/Translations/Translations.resx b/MinecraftClient/Resources/Translations/Translations.resx
index abc5c08b..26117d75 100644
--- a/MinecraftClient/Resources/Translations/Translations.resx
+++ b/MinecraftClient/Resources/Translations/Translations.resx
@@ -2130,4 +2130,7 @@ Logging in...
Select a profile from available profiles:
+
+ MCC uses Sentry to log errors. You can opt-out by setting the EnableSentry option in the configuration file to false.
+
\ No newline at end of file
diff --git a/MinecraftClient/Scripting/CSharpRunner.cs b/MinecraftClient/Scripting/CSharpRunner.cs
index 1792dd5c..7f6c6e77 100644
--- a/MinecraftClient/Scripting/CSharpRunner.cs
+++ b/MinecraftClient/Scripting/CSharpRunner.cs
@@ -116,10 +116,15 @@ namespace MinecraftClient.Scripting
foreach (var failure in result.Failures)
{
- ConsoleIO.WriteLogLine($"[Script] Error in {scriptName}, line:col{failure.Location.GetMappedLineSpan()}: [{failure.Id}] {failure.GetMessage()}");
+ // Get the line that contains the error:
+
+ var loc = failure.Location.GetMappedLineSpan();
+ var line = code.Split('\n')[loc.StartLinePosition.Line];
+
+ ConsoleIO.WriteLogLine($"[Script] Error in {scriptName}, on line ({line.Trim()}): [{failure.Id}] {failure.GetMessage()}");
}
- throw new CSharpException(CSErrorType.InvalidScript, new InvalidProgramException("Compilation failed due to error."));
+ throw new CSharpException(CSErrorType.InvalidScript, new InvalidProgramException("Compilation failed due to error(s)."));
}
ConsoleIO.WriteLogLine("[Script] Compilation done with no errors.");
@@ -182,8 +187,7 @@ namespace MinecraftClient.Scripting
public CSErrorType ExceptionType { get { return _type; } }
public override string Message { get { return InnerException!.Message; } }
public override string ToString() { return InnerException!.ToString(); }
- public CSharpException(CSErrorType type, Exception inner)
- : base(inner != null ? inner.Message : "", inner)
+ public CSharpException(CSErrorType type, Exception inner) : base(inner.Message, inner)
{
_type = type;
}
diff --git a/MinecraftClient/Settings.cs b/MinecraftClient/Settings.cs
index 145ef4e6..d8d564c9 100644
--- a/MinecraftClient/Settings.cs
+++ b/MinecraftClient/Settings.cs
@@ -506,6 +506,9 @@ namespace MinecraftClient
[TomlDoNotInlineObject]
public class AdvancedConfig
{
+ [TomlInlineComment("$Main.Advanced.enable_sentry$")]
+ public bool EnableSentry = true;
+
[TomlInlineComment("$Main.Advanced.language$")]
public string Language = "en_us";
diff --git a/README.md b/README.md
index 76db9675..fb690dd9 100644
--- a/README.md
+++ b/README.md
@@ -74,3 +74,10 @@ The main terms of the CDDL-1.0 license are basically the following:
More info at http://qstuff.blogspot.fr/2007/04/why-cddl.html
Full license at http://opensource.org/licenses/CDDL-1.0
+
+## Uses technologies from
+
diff --git a/docs/yarn.lock b/docs/yarn.lock
index 44c2ea80..7c3cb3be 100644
--- a/docs/yarn.lock
+++ b/docs/yarn.lock
@@ -5108,9 +5108,9 @@ wrappy@1:
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
ws@^8.4.2:
- version "8.10.0"
- resolved "https://registry.yarnpkg.com/ws/-/ws-8.10.0.tgz#00a28c09dfb76eae4eb45c3b565f771d6951aa51"
- integrity sha512-+s49uSmZpvtAsd2h37vIPy1RBusaLawVe8of+GyEPsaJTCMpj/2v8NpeK1SHXjBlQ95lQTmQofOJnFiLoaN3yw==
+ version "8.17.1"
+ resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b"
+ integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==
yallist@^4.0.0:
version "4.0.0"