Skip to content

[Bug]: discord unlink command causes a server crash in 1.21.8 #603

@jamez2128

Description

@jamez2128

What happened?

When using the discord unlink command without arguments into the console, it crashes the entire server.

Steps to reproduces:
Step 1: Go into minecraft server console
Step 2: Type "discord unlink"
Step 3: See logs in the crash report section

Minecraft version: 1.21.8
Fabric Loader version: 0.17.2
Fabric API version: fabric-api-0.131.0+1.21.8.jar

Game Version

Other

What platform are you using?

Fabric

Platform version

0.17.2

Config File

(Configs unchanged except bot token and bot channel)

Crash report / Error log (if applicable)

discord unlink
[00:15:23] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
        at knot/de.erdbeerbaerlp.dcintegration.common.minecraftCommands.UnlinkCommand.execute(UnlinkCommand.java:17) ~[de_erdbeerbaerlp_dcintegration_common-3.1.0-55dc154341f71a65.jar:?]
        at knot/net.minecraft.class_2170.handler$zzg000$dcintegration-fabric$execute(class_2170.java:689) ~[server-intermediary.jar:?]
        at knot/net.minecraft.class_2170.method_9249(class_2170.java) ~[server-intermediary.jar:?]
        at knot/net.minecraft.class_2170.method_44252(class_2170.java:336) ~[server-intermediary.jar:?]
        at knot/net.minecraft.class_3176.method_13941(class_3176.java:300) ~[server-intermediary.jar:?]
        at knot/net.minecraft.class_3176.method_61254(class_3176.java:282) ~[server-intermediary.jar:?]
        at knot/net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:938) ~[server-intermediary.jar:?]
        at knot/net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:707) ~[server-intermediary.jar:?]
        at knot/net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:291) ~[server-intermediary.jar:?]
        at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
[00:15:23] [Server thread/ERROR]: This crash report has been saved to: D:\test_mc_server\smp\crash-reports\crash-2025-08-09_00.15.23-server.txt
[00:15:23] [Server thread/INFO]: Stopping server
[00:15:23] [Server thread/INFO]: Saving players
[00:15:23] [Server thread/INFO]: Saving worlds
[00:15:23] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld
[00:15:24] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether
[00:15:24] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end
[00:15:24] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[00:15:24] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[00:15:24] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[00:15:24] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
[00:15:24] [Server thread/INFO]: Unloading addons...
[00:15:24] [Server thread/INFO]: Unloaded addons
[00:15:24] [Server thread/INFO]: Unloading instance: net.dv8tion.jda.internal.JDAImpl@6077f896
[00:15:24] [Server thread/INFO]: Unloading listener: de.erdbeerbaerlp.dcintegration.common.DiscordEventListener@3eb4e23b
[00:15:24] [Server thread/INFO]: Waiting for JDA to shut-down...
[00:15:24] [Server thread/INFO]: JDA shut-down gracefully

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions