Skip to content

Rapid execution of the /god command #16

@AlexVin-Dev

Description

@AlexVin-Dev

Bug Report

EliteEssentials Version
What version of EliteEssentials are you running?
Example: v1.1.4

  • Version: Unknown (based on stack trace, likely contains bug in HytaleGodCommand.java:86)

Hytale Version
What version of Hytale is this happening on?

  • Version: v2026.0128-87d03be09

What is the issue?
Rapid execution of the /god command (3+ times within seconds) causes a critical failure in the Entity Component System (ECS). The plugin attempts to remove an Invulnerable component that doesn't exist in the player's entity archetype, corrupting the entity's data structure. This leads to a cascade of IndexOutOfBoundsException errors across multiple systems (emote plugin, block health system, etc.), ultimately crashing the world thread and forcing the world to shutdown.


How can we reproduce it?
Steps to make the bug happen again:

  1. Grant a player permission to use /god and /gm commands
  2. Have the player execute /god command rapidly 3+ times within 2-3 seconds
  3. Immediately follow with /gm c and /gm a commands
  4. Execute /god once more
  5. Observe server logs for the chain of exceptions and world crash

What did you expect to happen?
The /god command should safely toggle invulnerability status regardless of execution frequency, without corrupting entity data or affecting other systems. Subsequent commands should execute normally.


What have you tried already?
Let us know what troubleshooting steps you've done.

  • Restarted the server (required after world crash)
  • Verified command permissions are correctly set
  • Checked that no other conflicting god-mode plugins are installed
  • Monitored server logs for error patterns

Logs / Screenshots
Please include anything that helps us understand the problem better:

Critical Error Chain:

[2026/01/28 16:12:46 SEVERE] [AbstractCommand] Exception while running that command:
java.lang.IllegalArgumentException: ComponentType is not in archetype: ComponentType{... typeClass=...Invulnerable, index=23}
at com.hypixel.hytale.component.Archetype.validateComponentType(Archetype.java:146)
at com.hypixel.hytale.component.Holder.removeComponent(Holder.java:307)
at com.hypixel.hytale.component.Store.removeComponent(Store.java:1254)
at ThirdPartyPlugin//com.eliteessentials.commands.hytale.HytaleGodCommand.execute(HytaleGodCommand.java:86)

Cascade Failures (examples):

[2026/01/28 16:12:46 SEVERE] [World|default] Failed to run task!
java.lang.IndexOutOfBoundsException: Index out of range: 1
at com.hypixel.hytale.component.ArchetypeChunk.getComponent(ArchetypeChunk.java:159)
at ThirdPartyPlugin//com._056.emote.DoubleTapDetector.a(Unknown Source)

World Crash:

[2026/01/28 16:12:46 SEVERE] [Hytale] Exception in thread Thread[#110,WorldThread - default,5,...]:
java.lang.IndexOutOfBoundsException: Index out of range: 1
[2026/01/28 16:12:46 INFO] [World|default] Stopping world default...

Additional context
Anything else we should know?

  • Other plugins installed: Emote plugin (com._056.emote.DoubleTapDetector) - also affected by the corruption
  • Trigger pattern: The issue consistently occurs with rapid command execution, suggesting a race condition or state synchronization problem
  • Impact: World-wide crash affecting all players in the instance
  • Workaround: Currently advising players to use /god command with at least 2-3 second intervals between uses
  • Environment: Multiplayer server with ECS-based entity system (Hytale's component architecture)

Root Cause Analysis: The HytaleGodCommand.execute() method at line 86 calls removeComponent() on an entity's Invulnerable component without verifying the component's existence in the current archetype. When commands are executed rapidly, the entity's state may change between checks, leading to attempts to remove non-existent components and corrupting the ECS indices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions