Skip to content

[Bug] Incorrect server state values (always 0) in EssentialsX-Folia #13

@RHX0R3

Description

@RHX0R3

[Bug] Incorrect server state values (always 0) in EssentialsX-Folia → normal players kicked as “Server is full!” while admins can bypass

Deutsch (DE)

Zusammenfassung

Auf einem Folia 1.21.11 build 12 Backend (hinter Velocity) beobachten wir mit EssentialsX-Folia inkonsistente bzw. offensichtlich falsche Serverzustandswerte: mehrere Essentials-Ausgaben deuten darauf hin, dass Variablen wie Entity-Anzahlen und/oder Spieler-/Slot-Zustände nicht korrekt erfasst bzw. verarbeitet werden und dauerhaft 0 liefern. In der Folge werden normale Spieler beim Join häufig mit „Server is full!“ getrennt, obwohl Folia selbst freie Slots anzeigt.

Admins/OPs können weiterhin verbinden, was auf einen aktivierten Bypass-Pfad hindeutet. Zusätzlich können wir normalen Spielern durch eine Essentials-Permission (siehe unten) ebenfalls den Join ermöglichen – allerdings ergibt das in unserem Szenario logisch keinen Sinn, da es den “Server voll”-Status effektiv ignoriert (und dennoch laut Folia freie Slots vorhanden sind).

Umgebung

  • Backend: Folia 1.21.11 build 12
  • Proxy: Velocity (modern forwarding)
  • EssentialsX-Folia: EssentialsX-2.22.0-dev+69-675b801-Folia.jar
  • Slots: max-players=16
  • Permissions: LuckPerms (Admins sind OP bzw. besitzen globale Rechte wie *)

Erwartetes Verhalten

  • EssentialsX-Folia sollte korrekte Werte liefern und verarbeiten für:
    • Spieler-/Slot-Zustand (online/max players)
    • Entity-Anzahlen (z.B. Drops/Items)
  • Normale Spieler sollten verbinden können, solange freie Slots vorhanden sind.

Tatsächliches Verhalten

  • Normale Spieler werden beim Join getrennt:
    • Kick-Message: Server is full!
    • Backend-Log-Beispiel:
      • Disconnecting <player> ...: Server is full!
  • Gleichzeitig zeigt Folia:
    • There are 0 out of maximum 16 players online.
  • Essentials-Kommandos, die Entities zählen/entfernen, melden ebenfalls dauerhaft 0, z.B.:
    • Removed 0 entities.
    • bzw. ähnlich: Killed 0 drops.
      (auch in Situationen, in denen definitiv Entities vorhanden sind)

LuckPerms / Permission-basierter Workaround (Hinweis auf Bypass)

Wir nutzen LuckPerms und konnten verifizieren, dass normale Spieler durch Setzen einer Essentials-Permission wieder joinen können:

  • Permission: essentials.joinfullserver

Damit können Spieler trotz des “Server is full!”-Kicks verbinden. Das wirkt wie ein Bypass für einen Full-Server-Check – ist in unserem Fall jedoch inkonsistent, weil Folia gleichzeitig freie Slots meldet (z.B. 0/16) und ein “Joinfull”-Bypass daher keinen sinnvollen Zweck hätte.

Das spricht dafür, dass EssentialsX-Folia den Full-Server-Status fälschlicherweise auslöst bzw. intern fehlerhafte Werte verwendet (z.B. maxPlayers = 0, onlinePlayers = 0, fehlerhafte Auswertung oder nicht korrekt aggregierter Zustand unter Folia).

Schritte zum Reproduzieren

  1. Folia 1.21.11 build 12 starten (hinter Velocity).
  2. EssentialsX-2.22.0-dev+69-675b801-Folia.jar installieren.
  3. max-players=16 setzen.
  4. Join-Versuch mit einem normalen Spieler (nicht OP, kein *).
  5. Beobachtung: Kick mit „Server is full!“
  6. Optional:
    • Die Permission essentials.joinfullserver via LuckPerms an den Spieler vergeben.
    • Join-Versuch erneut → Spieler kann verbinden (Bypass greift).
  7. Zusätzlich (Indikator):
    • Essentials-Aktionen/Kommandos, die Entities zählen/entfernen, liefern 0 (Removed 0 entities.), auch wenn Entities vorhanden sind.

Zusätzliche Hinweise / Hypothese

  • Es scheint, als ob EssentialsX-Folia unter Folia 1.21.11 bestimmte “global” ermittelte Zustände nicht korrekt abfragt oder auswertet (z.B. Online-Player-Listen, Max-Players, Entity-Iteration).
  • Der Full-Server-Check wird vermutlich durch fehlerhafte Werte ausgelöst und führt dann zum Kick-Reason “Server is full!”, während Admins oder Spieler mit essentials.joinfullserver diesen Pfad umgehen können.

Workaround

  • Entfernen/Deaktivieren von EssentialsX-Folia → normale Spieler können wieder joinen (bei uns reproduzierbar).
  • Alternativ: Vergabe von essentials.joinfullserver an Spieler (nicht empfehlenswert, da es den “Full”-Status umgeht und die Ursache nicht behebt).

Bitte / Wunsch

  • Prüfung, warum unter Folia 1.21.11 Serverzustände (Spieler/Slots/Entities) offenbar als 0 verarbeitet werden.
  • Insbesondere:
    • Woher EssentialsX-Folia den Full-Server-Status ableitet
    • Online-/MaxPlayers-Abfragen
    • Entity-Iteration/Count (Drops/Items)
    • Sicherstellung, dass “Joinfull”-Bypass nicht erforderlich ist, wenn Folia selbst freie Slots meldet

English (EN)

Summary

On a Folia 1.21.11 build 12 backend (behind Velocity), we observe clearly incorrect server-state values reported/used by EssentialsX-Folia: multiple Essentials outputs suggest that values such as entity counts and potentially player/slot state are not evaluated correctly and appear to be always 0. As a result, regular players are frequently disconnected on join with “Server is full!”, even though Folia itself reports free slots.

Admins/OPs can still connect, indicating a bypass path. Additionally, we can allow regular players to join by granting a specific Essentials permission (see below). However, this is logically inconsistent in our setup because Folia reports available slots (e.g. 0/16), so a “join-full” bypass should not be relevant.

Environment

  • Backend: Folia 1.21.11 build 12
  • Proxy: Velocity (modern forwarding)
  • EssentialsX-Folia: EssentialsX-2.22.0-dev+69-675b801-Folia.jar
  • Slots: max-players=16
  • Permissions: LuckPerms (admins are OP / have broad permissions such as *)

Expected behavior

  • EssentialsX-Folia should report and process correct values for:
    • player/slot state (online/max players)
    • entity counts (e.g., drops/items)
  • Regular players should be able to join as long as slots are available.

Actual behavior

  • Regular players are disconnected on join:
    • Kick message: Server is full!
    • Backend log example:
      • Disconnecting <player> ...: Server is full!
  • At the same time, Folia reports:
    • There are 0 out of maximum 16 players online.
  • Essentials commands/actions that count/remove entities appear to always return 0, e.g.:
    • Removed 0 entities.
    • or similarly: Killed 0 drops.
      (even when entities are clearly present)

LuckPerms / Permission-based workaround (bypass indication)

We use LuckPerms and confirmed that regular players can join after granting the following Essentials permission:

  • Permission: essentials.joinfullserver

This effectively bypasses the “Server is full!” kick. In our case, this is inconsistent because Folia reports free slots (e.g. 0/16), so a join-full bypass should not be necessary.

This suggests that EssentialsX-Folia is incorrectly triggering the full-server condition internally (e.g. evaluating maxPlayers = 0, onlinePlayers = 0, faulty aggregation under Folia, or incorrect logic).

Steps to reproduce

  1. Start Folia 1.21.11 build 12 (behind Velocity).
  2. Install EssentialsX-2.22.0-dev+69-675b801-Folia.jar.
  3. Ensure max-players=16.
  4. Attempt to join with a regular player (not OP, no * perms).
  5. Observe: disconnected with “Server is full!”
  6. Optional:
    • Grant essentials.joinfullserver via LuckPerms.
    • Retry join → player can connect (bypass works).
  7. Additional indicator:
    • Run Essentials actions/commands that count/remove entities → always returns 0 (Removed 0 entities.) even when entities exist.

Additional notes / hypothesis

  • EssentialsX-Folia appears to be unable to correctly read or evaluate certain “global” state on Folia 1.21.11 (online players/max players/entity iteration).
  • A full-server condition is likely triggered by incorrect values and results in the “Server is full!” kick, while admins or players with essentials.joinfullserver bypass the restriction.

Workaround

  • Remove/disable EssentialsX-Folia → regular players can join again (reproducible in our case).
  • Alternatively, grant essentials.joinfullserver to affected players (not recommended; bypasses the symptom and does not address the root cause).

Request

Please investigate why server-state values (players/slots/entities) appear to be processed as 0 on Folia 1.21.11, specifically:

  • how the full-server condition is determined in this fork
  • online/max players queries
  • entity iteration/counting (drops/items)
  • ensuring a join-full bypass is not required when Folia itself reports available slots

Logs / Evidence (placeholders)

I can provide full logs on request; relevant excerpts include:

  • Folia console output: There are 0 out of maximum 16 players online.
  • Kick log: Disconnecting <player> ...: Server is full!
  • Essentials output: Removed 0 entities. / Killed 0 drops.

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