Skip to content

Commit

Permalink
chore: fixed ProtocolVersion enum typo (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
PMK744 authored Oct 3, 2024
1 parent 722d845 commit d1ff75b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class TargetPluginItem implements QuickPickItem {
// 2 - add targetModuleUuid to protocol event
// 3 - add array of plugins and target module ids to incoming protocol event
// 4 - mc can require a passcode to connect
enum ProtcolVersion {
enum ProtocolVersion {
Initial = 1,
SupportTargetModuleUuid = 2,
SupportTargetSelection = 3,
Expand All @@ -98,7 +98,7 @@ enum ProtcolVersion {
// The Debug Adapter for 'minecraft-js'
//
export class Session extends DebugSession {
private static DEBUGGER_PROTOCOL_VERSION = ProtcolVersion.SupportPasscode;
private static DEBUGGER_PROTOCOL_VERSION = ProtocolVersion.SupportPasscode;

private static CONNECTION_RETRY_ATTEMPTS = 5;
private static CONNECTION_RETRY_WAIT_MS = 2000;
Expand Down Expand Up @@ -768,9 +768,9 @@ export class Session extends DebugSession {
if (Session.DEBUGGER_PROTOCOL_VERSION < protocolCapabilities.version) {
this.terminateSession('protocol mismatch. Update Debugger Extension.', LogLevel.Error);
} else {
if (protocolCapabilities.version == ProtcolVersion.SupportTargetModuleUuid) {
if (protocolCapabilities.version == ProtocolVersion.SupportTargetModuleUuid) {
this.onConnectionComplete(protocolCapabilities.version, undefined);
} else if (protocolCapabilities.version >= ProtcolVersion.SupportTargetSelection) {
} else if (protocolCapabilities.version >= ProtocolVersion.SupportTargetSelection) {
// no add-ons found, nothing to do
if (!protocolCapabilities.plugins || protocolCapabilities.plugins.length === 0) {
this.terminateSession('protocol error. No Minecraft Add-Ons found.', LogLevel.Error);
Expand Down

0 comments on commit d1ff75b

Please sign in to comment.