
"Cannot remove from team" workaround
Eliminate lag spikes on render thread caused by IllegalStateException thrown in Scoreboard.removeScoreHolderFromTeam().
About this Mod
"Cannot remove from team" workaround
On some buggy servers you may have noticeable lag spikes caused by Error executing task on client:
net.minecraft.class_148: Main thread packet handler
at net.minecraft.class_2600.method_11072(class_2600.java:33) ~[client-intermediary.jar:?]
at net.minecraft.class_1255.method_18859(class_1255.java:156) ~[client-intermediary.jar:?]
at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[client-intermediary.jar:?]
at net.minecraft.class_1255.method_16075(class_1255.java:130) ~[client-intermediary.jar:?]
at net.minecraft.class_1255.method_5383(class_1255.java:115) ~[client-intermediary.jar:?]
at net.minecraft.class_310.method_1523(class_310.java:1283) ~[client-intermediary.jar:?]
at net.minecraft.class_310.method_1514(class_310.java:888) ~[client-intermediary.jar:?]
at net.minecraft.client.main.Main.main(Main.java:265) ~[Fabric%201.20.4.jar:?]
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.7.jar:?]
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.7.jar:?]
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) ~[fabric-loader-0.15.7.jar:?]
Caused by: java.lang.IllegalStateException: Player is either on another team or not on any team. Cannot remove from team 'Z/Sta/517631'.
at net.minecraft.class_269.method_1157(class_269.java:307) ~[client-intermediary.jar:?]
at net.minecraft.class_634.method_11099(class_634.java:2029) ~[client-intermediary.jar:?]
at net.minecraft.class_5900.method_34173(class_5900.java:129) ~[client-intermediary.jar:?]
at net.minecraft.class_5900.method_11054(class_5900.java:14) ~[client-intermediary.jar:?]
at net.minecraft.class_2600.method_11072(class_2600.java:24) ~[client-intermediary.jar:?]
... 10 more
One thing this mod does is it replaces IllegalStateException throwing with LOGGER.warn().
Default net.minecraft.scoreboard.Scoreboard.removeScoreHolderFromTeam() (class_269.method_1157()) implementation:
public void removeScoreHolderFromTeam(String scoreHolderName, Team team) {
if (this.getScoreHolderTeam(scoreHolderName) != team) {
throw new IllegalStateException("Player is either on another team or not on any team. Cannot remove from team '" + team.getName() + "'.");
} else {
this.teamsByScoreHolder.remove(scoreHolderName);
team.getPlayerList().remove(scoreHolderName);
}
}
Though I'm not a Java coding guru, I don't understand why the exception is thrown on render thread.
Available Versions
How to Install "Cannot remove from team" workaround on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set fabric Loader
In the panel under "Egg", select the fabric loader and matching Minecraft version (1.20.4).
Install Mod
Open the mod browser in the dashboard and search for ""Cannot remove from team" workaround". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
1.20.4, 1.20.3
Server-side
✗ UnsupportedRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
"Cannot remove from team" workaround server crashes on startup – what to do?
Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.20.4). You can switch loaders with one click in the panel.
Is "Cannot remove from team" workaround compatible with fabric?
"Cannot remove from team" workaround officially supports fabric for Minecraft 1.20.4, 1.20.3. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with "Cannot remove from team" workaround – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if "Cannot remove from team" workaround consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Similar Mods
Rent Modded Server
Install "Cannot remove from team" workaround with just one click on your server.