0x3B S3BPacketScoreboardObjective
Creates or removes a scoreboard objective (the scoreboard itself, not individual scores).
Published 2026-06-18 · Updated 2026-10-14
Fields
| Field | Type | Description |
|---|---|---|
| name | String | Objective internal name |
| value | String | Objective display text (JSON, for create/update) |
| action | byte | 0=CREATE, 1=REMOVE, 2=UPDATE |
| type | String | integer or hearts (for create) |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Objective Name | String | |
| Mode | byte | 0=create, 1=remove, 2=update |
| Objective Value | String | Display text (Chat Component) |
| Type | String | integer or hearts |
MCP References
NetHandlerPlayClient.handleScoreboardObjective()Handler Interface
INetHandlerPlayClientVanilla Source
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
Deobfuscated MCP 1.8.9 source of S3BPacketScoreboardObjective, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/server/S3BPacketScoreboardObjective.java) at build time and verified present.
Deep Dive
Role in the protocol
The scoreboard objective lifecycle packet. A byte action drives it: 0 creates an objective, 1 removes it, 2 updates its display name and render type. Wire fields are the objective name (16-char cap), the action byte, then conditionally for actions 0 and 2 the display name (32-char cap) and the render type string ('integer' or 'hearts'). Objectives are containers; the visible rows arrive separately via S3CPacketUpdateScore and the display slot binding via S3DPacketDisplayScoreboard. ServerScoreboard broadcasts S3B to all players on objective creation, removal, and display-name change.
Vanilla handling
NetHandlerPlayClient.handleScoreboardObjective creates a ScoreObjective with the DUMMY criteria on action 0, sets display name and render type, removes the objective on action 1, and applies display name and render type on action 2. The client scoreboard is the only consumer: the HUD sidebar renders whatever objective the S3D binding points at, populated by S3C rows. Because S3B never carries row data, cancelling it produces an objective-less board, not a blank one.
Why clients touch it
The landscape is thin across the 8 clients. Spicy's HideName imports the class but its EventPacket handler never branches on it: the import is dead weight from a name-hiding feature that actually rewrites S3C rows. Rise 6.1.30 and 6.2.4 register the class in the script API NetworkAPI table so JavaScript scripts can construct or match it. No client cancels S3B. The scoreboard-blocking modules that exist in the wider ecosystem (Gugustus Scoreboard, AntiScoreboard) sit outside this corpus, so none of the 8 reference clients carries an objective-blocker.
Exploit surface
Cancelling S3B is client-visual only. Blocking action 0 leaves rows orphaned, which renders as a sidebar with no header; blocking action 1 freezes a stale objective. The server never learns, because S3B is one-way clientbound and the server does not track which objectives a client holds. Anti-cheats in the corpus never measure scoreboard packets: they carry display strings and no timing or movement state. The only abuse value is a clean HUD, and none of the 8 clients bothers.
Server-Side Handling
ServerScoreboard emits S3B on objective creation (action 0), removal (action 1), and display name or render type updates (action 2), fanned out with sendPacketToAllPlayers. The server never reads S3B back; the packet is strictly clientbound in PLAY state, registered in EnumConnectionState alongside the rest of the scoreboard family. There is no client-to-server scoreboard acknowledgement in the protocol.
Protocol Analysis
readPacketData reads the objective name with a 16-char cap, then the action byte, then only for actions 0 and 2 the 32-char display name and the render type string, mapped through EnumRenderType.func_178795_a. writePacketData mirrors this, so a create packet missing the trailing fields desyncs the stream. Action 1 sends name plus action byte only.
Anti-Cheat Landscape
No anti-cheat in the corpus inspects S3B. It carries display strings only, no timing, position, or movement content. The only measurable effect of tampering is client-side rendering, which server-side anti-cheat cannot observe. Any module touching it is doing cosmetic work with zero detection risk.
implementation Implementation Cases
The objective lifecycle packet. Across the 8 reference clients it is only an import (Spicy HideName) and a script API registration (Rise 6.x). Nobody cancels or mutates it, because the visible rows travel in S3C and the slot binding in S3D.
Hide the player's real username from server-rendered name surfaces. For this packet the class is only imported; the shipped onEvent branches on S02PacketChat and S3CPacketUpdateScore, never on S3BPacketScoreboardObjective.
Imports S3BPacketScoreboardObjective at the top of the module file. The EventPacket pre handler has no S3B branch; the module's real work sits in the S3C branch, which rewrites score names to a chosen alias. The S3B import is a leftover from the same name-hiding feature.
// ===== FILE: Spicy, info/spicyclient/modules/player/HideName.java =====
package info.spicyclient.modules.player;
import org.lwjgl.input.Keyboard;
import info.spicyclient.SpicyClient;
import info.spicyclient.events.Event;
import info.spicyclient.events.listeners.EventPacket;
import info.spicyclient.events.listeners.EventUpdate;
import info.spicyclient.modules.Module;
import info.spicyclient.settings.ModeSetting;
import info.spicyclient.settings.SettingChangeEvent;
import net.minecraft.network.play.server.S02PacketChat;
import net.minecraft.network.play.server.S3BPacketScoreboardObjective;
import net.minecraft.network.play.server.S3CPacketUpdateScore;
import net.minecraft.network.play.server.S3DPacketDisplayScoreboard;
import net.minecraft.util.ChatComponentText;
public class HideName extends Module {
public ModeSetting mode = new ModeSetting("Name", "You", "You", "MooshroomMashUp", "Fox_of_floof", "lavaflowglow", "_Floofy_Fox_");
public HideName() {
super("HideName", Keyboard.KEY_NONE, Category.PLAYER);
resetSettings();
}
@Override
public void resetSettings() {
this.settings.clear();
this.addSettings(mode);
}
@Override
public void onEvent(Event e) {
if (e instanceof EventUpdate && e.isPre()) {
this.additionalInformation = mode.getMode();
}
if (e instanceof EventPacket && e.isPre()) {
EventPacket packetEvent = (EventPacket) e;
if (packetEvent.packet instanceof S02PacketChat) {
S02PacketChat packet = (S02PacketChat) packetEvent.packet;
if (packet.getChatComponent().getUnformattedText().replaceAll("", "").contains(mc.getSession().getUsername())) {
packet.chatComponent = new ChatComponentText(packet.getChatComponent().getFormattedText().replaceAll("", "").replaceAll(mc.getSession().getUsername(), mode.getMode()));
}
}
else if (packetEvent.packet instanceof S3CPacketUpdateScore) {
S3CPacketUpdateScore packet = (S3CPacketUpdateScore) packetEvent.packet;
if (packet.getObjectiveName().replaceAll("", "").contains(mc.getSession().getUsername())){
packet.setObjective(packet.getObjectiveName().replaceAll("", "").replaceAll(mc.getSession().getUsername(), mode.getMode()));
}
if (packet.getName().replaceAll("", "").contains(mc.getSession().getUsername())){
packet.setName(packet.getName().replaceAll("", "").replaceAll(mc.getSession().getUsername(), mode.getMode()));
}
}
}
}
}
// NOTE (AI): The S3BPacketScoreboardObjective import on line 13 is never referenced by the handler. The module's live packet logic is the S3CPacketUpdateScore branch on lines 52-63, which rewrites score rows to hide the session username.Expose the packet class to Rise's JavaScript scripting API so scripts can construct, read, or match it from the clientbound table.
NetworkAPI.java holds a static Class array of clientbound packets that includes S3BPacketScoreboardObjective. The API maps packet ids to classes for script-side instantiation and inspection; it is an API surface, not a runtime module.
// ===== FILE: Rise 6.1.30, com/alan/clients/script/api/NetworkAPI.java =====
package com.alan.clients.script.api;
import com.alan.clients.util.chat.ChatUtil;
import lombok.SneakyThrows;
import net.minecraft.network.EnumPacketDirection;
import net.minecraft.network.Packet;
import net.minecraft.network.play.INetHandlerPlayClient;
import net.minecraft.network.play.INetHandlerPlayServer;
import net.minecraft.network.play.client.*;
import net.minecraft.network.play.server.*;
import javax.script.ScriptException;
import java.util.Arrays;
public class NetworkAPI extends API {
public final static Class<Packet<INetHandlerPlayServer>>[] serverbound = new Class[]{
C00PacketKeepAlive.class,
C01PacketChatMessage.class,
C02PacketUseEntity.class,
C03PacketPlayer.class,
C03PacketPlayer.C04PacketPlayerPosition.class,
C03PacketPlayer.C05PacketPlayerLook.class,
C03PacketPlayer.C06PacketPlayerPosLook.class,
C07PacketPlayerDigging.class,
C08PacketPlayerBlockPlacement.class,
C09PacketHeldItemChange.class,
C0APacketAnimation.class,
C0BPacketEntityAction.class,
C0CPacketInput.class,
C0DPacketCloseWindow.class,
C0EPacketClickWindow.class,
C0FPacketConfirmTransaction.class,
C10PacketCreativeInventoryAction.class,
C11PacketEnchantItem.class,
C12PacketUpdateSign.class,
C13PacketPlayerAbilities.class,
C14PacketTabComplete.class,
C15PacketClientSettings.class,
C16PacketClientStatus.class,
C17PacketCustomPayload.class,
C18PacketSpectate.class,
C19PacketResourcePackStatus.class,
};
public final static Class<Packet<INetHandlerPlayClient>>[] clientbound = new Class[]{
S00PacketKeepAlive.class,
S01PacketJoinGame.class,
S02PacketChat.class,
S03PacketTimeUpdate.class,
S04PacketEntityEquipment.class,
S05PacketSpawnPosition.class,
S06PacketUpdateHealth.class,
S07PacketRespawn.class,
S08PacketPlayerPosLook.class,
S09PacketHeldItemChange.class,
S0APacketUseBed.class,
S0BPacketAnimation.class,
S0CPacketSpawnPlayer.class,
S0DPacketCollectItem.class,
S0EPacketSpawnObject.class,
S0FPacketSpawnMob.class,
S10PacketSpawnPainting.class,
S11PacketSpawnExperienceOrb.class,
S12PacketEntityVelocity.class,
S13PacketDestroyEntities.class,
S14PacketEntity.class,
S18PacketEntityTeleport.class,
S19PacketEntityHeadLook.class,
S19PacketEntityStatus.class,
S1BPacketEntityAttach.class,
S1CPacketEntityMetadata.class,
S1DPacketEntityEffect.class,
S1EPacketRemoveEntityEffect.class,
S1FPacketSetExperience.class,
S20PacketEntityProperties.class,
S21PacketChunkData.class,
S22PacketMultiBlockChange.class,
S23PacketBlockChange.class,
S24PacketBlockAction.class,
S25PacketBlockBreakAnim.class,
S26PacketMapChunkBulk.class,
S27PacketExplosion.class,
S28PacketEffect.class,
S29PacketSoundEffect.class,
S2APacketParticles.class,
S2BPacketChangeGameState.class,
S2CPacketSpawnGlobalEntity.class,
S2DPacketOpenWindow.class,
S2EPacketCloseWindow.class,
S2FPacketSetSlot.class,
S30PacketWindowItems.class,
S31PacketWindowProperty.class,
S32PacketConfirmTransaction.class,
S33PacketUpdateSign.class,
S34PacketMaps.class,
S35PacketUpdateTileEntity.class,
S36PacketSignEditorOpen.class,
S37PacketStatistics.class,
S38PacketPlayerListItem.class,
S39PacketPlayerAbilities.class,
S3APacketTabComplete.class,
S3BPacketScoreboardObjective.class,
S3CPacketUpdateScore.class,
S3DPacketDisplayScoreboard.class,
S3EPacketTeams.class,
S3FPacketCustomPayload.class,
S40PacketDisconnect.class,
S41PacketServerDifficulty.class,
S42PacketCombatEvent.class,
S43PacketCamera.class,
S44PacketWorldBorder.class,
S45PacketTitle.class,
S46PacketSetCompressionLevel.class,
S47PacketPlayerListHeaderFooter.class,
S48PacketResourcePackSend.class,
S49PacketUpdateEntityNBT.class
};
@SneakyThrows
private static Packet<?> instantiatePacket(final EnumPacketDirection direction, final int id, final Object... params) {
Packet<?> packet = null;
try {
if (direction == EnumPacketDirection.CLIENTBOUND) {
packet = (Packet<?>) Arrays.stream(clientbound[id].getConstructors()).filter(x -> x.getParameterCount() == params.length).findFirst().get().newInstance(params);
} else if (direction == EnumPacketDirection.SERVERBOUND) {
packet = (Packet<?>) Arrays.stream(serverbound[id].getConstructors()).filter(x -> x.getParameterCount() == params.length).findFirst().get().newInstance(params);
}
} catch (Exception ex) {
ChatUtil.display("Failed to instantiate packet!");
throw new ScriptException(ex);
}
return packet;
}
public void sendPacket(final int id, final Object... params) {
final Packet<?> packet = instantiatePacket(EnumPacketDirection.SERVERBOUND, id, params);
MC.getNetHandler().addToSendQueue(packet);
}
public void receivePacket(final int id, final Object... params) {
final Packet<?> packet = instantiatePacket(EnumPacketDirection.CLIENTBOUND, id, params);
MC.getNetHandler().addToReceiveQueue(packet);
}
public boolean isSingleplayer() {
return MC.isSingleplayer();
}
public boolean isMultiplayer() {
return !MC.isSingleplayer() && MC.getCurrentServerData() != null;
}
public String getServerIP() {
return MC.getCurrentServerData() != null
? MC.getCurrentServerData().serverIP
: null;
}
public String getServerName() {
return MC.getCurrentServerData() != null
? MC.getCurrentServerData().serverName
: null;
}
public String getServerMOTD() {
return MC.getCurrentServerData() != null
? MC.getCurrentServerData().serverMOTD
: null;
}
}
// NOTE (AI): The clientbound array lists S3BPacketScoreboardObjective at line 102. This file is the script API table for Rise 6.x; the identical file ships in 6.2.4 under Client-release2/Client/src/main/java.anticheat Anti-Cheat Checks
S3B carries scoreboard objective lifecycle state, and only Shard touches it. The monitor HUD system consumes and emits the packet family: ScoreboardSlotObserver reads S3B REMOVE actions and S3D display binds to detect when its claimed sidebar slot is displaced, and ScoreboardPacketBridge builds the S3B objectives, S3D display binds and S3C score rows that render the monitor sidebar. Everything else in the corpus is plumbing or sibling-family noise: Negativity's SCOREBOARD_OBJECTIVE constant and Artemis' four scoreboard wrapper interfaces with their PacketRepository entries register the family, intave's ScoreboardAccessor and EntityCollisionDisabler build and read PacketPlayOutScoreboardTeam (S3E), NCP's CollisionUtil uses the Bukkit scoreboard API for team-collision lookups, and BetterAnticheat's ReloadCommand hits on a comment.
Watches the scoreboard objective and display streams so the monitor HUD notices when its claimed sidebar slot is taken over or its objective is removed by the server or another plugin.
MONITOR-priority PacketSendEvent listener active only while the slot registry holds claims. For S3B it wraps the event as WrapperPlayServerScoreboardObjective and, when the mode is REMOVE and the objective name matches a claim, fires the claim's onSlotLost callback; for S3D it compares the display slot against the claim and fires onSlotLost with a DISPLACED reason when a foreign objective binds there. The callback is deferred through tasksAfterSend onto the main thread.
// ===== FILE: KaelusAI-Shard, src/main/kotlin/ac/shard/monitor/core/ScoreboardSlotObserver.kt =====
/*
* This file is part of Shard - https://github.com/KaelusAI/Shard
* Copyright (C) 2026 KaelusAI
*
* Shard is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Shard is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ac.shard.monitor.core
import ac.shard.scheduler.SchedulerService
import com.github.retrooper.packetevents.event.PacketListenerAbstract
import com.github.retrooper.packetevents.event.PacketListenerPriority
import com.github.retrooper.packetevents.event.PacketSendEvent
import com.github.retrooper.packetevents.protocol.packettype.PacketType
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerDisplayScoreboard
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerScoreboardObjective
import org.bukkit.entity.Player
class ScoreboardSlotObserver(
private val scheduler: SchedulerService,
private val registry: ScoreboardSlotRegistry,
) : PacketListenerAbstract(PacketListenerPriority.MONITOR) {
override fun onPacketSend(event: PacketSendEvent) {
if (registry.isIdle()) {
return
}
val type = event.packetType
if (
type != PacketType.Play.Server.DISPLAY_SCOREBOARD &&
type != PacketType.Play.Server.SCOREBOARD_OBJECTIVE
) {
return
}
inspect(event, type == PacketType.Play.Server.DISPLAY_SCOREBOARD)
}
private fun inspect(event: PacketSendEvent, isDisplay: Boolean) {
val viewer = event.getPlayer<Any>() as? Player ?: return
val claims = registry.claimsFor(viewer.uniqueId) ?: return
if (isDisplay) {
inspectDisplay(event, viewer, claims)
} else {
inspectObjective(event, viewer, claims)
}
}
private fun inspectDisplay(event: PacketSendEvent, viewer: Player, claims: List<SlotClaim>) {
val wrapper = WrapperPlayServerDisplayScoreboard(event)
val foreign = wrapper.scoreName
if (foreign.isBlank()) {
return
}
val claim = claims.firstOrNull { it.slot == wrapper.position && it.objective != foreign }
claim?.let { defer(event, viewer, it, SlotLossReason.DISPLACED, foreign) }
}
private fun inspectObjective(event: PacketSendEvent, viewer: Player, claims: List<SlotClaim>) {
val wrapper = WrapperPlayServerScoreboardObjective(event)
if (wrapper.mode != WrapperPlayServerScoreboardObjective.ObjectiveMode.REMOVE) {
return
}
val claim = claims.firstOrNull { it.objective == wrapper.name }
claim?.let { defer(event, viewer, it, SlotLossReason.OBJECTIVE_REMOVED, wrapper.name) }
}
private fun defer(
event: PacketSendEvent,
viewer: Player,
claim: SlotClaim,
reason: SlotLossReason,
foreignObjective: String,
) {
event.tasksAfterSend.add(
Runnable {
scheduler.runSync(
viewer,
Runnable { claim.onLost.onSlotLost(viewer, reason, foreignObjective) },
)
}
)
}
}
// NOTE (AI): inspectObjective (lines 67-74) is the S3B branch: a REMOVE-mode objective matching a claimed name fires the claim's onSlotLost callback. inspectDisplay (lines 57-65) is the S3D branch for display-slot displacement.Emits the scoreboard objective, display and score packets that render Shard's monitor HUD sidebar for a viewer.
createObjective sends an S3B CREATE objective (name, INTEGER render type, component title, optional fixed score format) followed by an S3D display bind to the target slot; removeObjective sends an S3B REMOVE. updateEntry and removeEntry maintain the S3C score rows, choosing reset-score packets on servers that support fancy text (1.20.3+). All packets go out through the PacketEvents player manager.
// ===== FILE: KaelusAI-Shard, src/main/kotlin/ac/shard/monitor/core/ScoreboardPacketBridge.kt =====
/*
* This file is part of Shard - https://github.com/KaelusAI/Shard
* Copyright (C) 2026 KaelusAI
*
* Shard is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Shard is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ac.shard.monitor.core
import com.github.retrooper.packetevents.PacketEvents
import com.github.retrooper.packetevents.manager.server.ServerVersion
import com.github.retrooper.packetevents.protocol.score.ScoreFormat
import com.github.retrooper.packetevents.wrapper.PacketWrapper
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerDisplayScoreboard
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerResetScore
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerScoreboardObjective
import com.github.retrooper.packetevents.wrapper.play.server.WrapperPlayServerUpdateScore
import java.util.Optional
import net.kyori.adventure.text.Component
import org.bukkit.entity.Player
data class ObjectiveSpec(
val name: String,
val slot: Int,
val title: String,
val legacyTitleFallback: String,
val blankScoreText: String,
)
data class ScoreDisplay(val entryDisplay: String?, val scoreText: String?)
class ScoreboardPacketBridge(private val cache: ComponentCache) {
fun supportsFancyText(viewer: Player): Boolean =
serverSupportsFancyText() && clientVersion(viewer).isNewerThanOrEquals(ServerVersion.V_1_20_3)
fun createObjective(viewer: Player, spec: ObjectiveSpec) {
val fancy = supportsFancyText(viewer)
val title = if (fancy) spec.title else spec.title.ifBlank { spec.legacyTitleFallback }
val create =
if (fancy) {
WrapperPlayServerScoreboardObjective(
spec.name,
WrapperPlayServerScoreboardObjective.ObjectiveMode.CREATE,
cache.component(title),
WrapperPlayServerScoreboardObjective.RenderType.INTEGER,
ScoreFormat.fixedScore(cache.component(spec.blankScoreText)),
)
} else {
WrapperPlayServerScoreboardObjective(
spec.name,
WrapperPlayServerScoreboardObjective.ObjectiveMode.CREATE,
cache.component(title),
WrapperPlayServerScoreboardObjective.RenderType.INTEGER,
)
}
sendPacket(viewer, create)
sendPacket(viewer, WrapperPlayServerDisplayScoreboard(spec.slot, spec.name))
}
fun displayObjective(viewer: Player, name: String, slot: Int) {
sendPacket(viewer, WrapperPlayServerDisplayScoreboard(slot, name))
}
fun removeObjective(viewer: Player, name: String) {
sendPacket(
viewer,
WrapperPlayServerScoreboardObjective(
name,
WrapperPlayServerScoreboardObjective.ObjectiveMode.REMOVE,
Component.empty(),
null,
),
)
}
fun updateEntry(
viewer: Player,
objective: String,
entry: String,
score: Int,
display: ScoreDisplay,
) {
sendPacket(viewer, updateScorePacket(viewer, objective, entry, score, display))
}
fun removeEntry(viewer: Player, objective: String, entry: String) {
val packet =
if (supportsFancyText(viewer)) {
WrapperPlayServerResetScore(entry, objective)
} else {
WrapperPlayServerUpdateScore(
entry,
WrapperPlayServerUpdateScore.Action.REMOVE_ITEM,
objective,
Optional.empty(),
)
}
sendPacket(viewer, packet)
}
private fun updateScorePacket(
viewer: Player,
objective: String,
entry: String,
score: Int,
display: ScoreDisplay,
): PacketWrapper<*> {
if (!supportsFancyText(viewer)) {
return WrapperPlayServerUpdateScore(
entry,
WrapperPlayServerUpdateScore.Action.CREATE_OR_UPDATE_ITEM,
objective,
Optional.of(score),
)
}
val format =
display.scoreText?.let { ScoreFormat.fixedScore(cache.component(it)) }
?: ScoreFormat.blankScore()
return WrapperPlayServerUpdateScore(
entry,
WrapperPlayServerUpdateScore.Action.CREATE_OR_UPDATE_ITEM,
objective,
score,
display.entryDisplay?.let { cache.component(it) },
format,
)
}
fun serverSupportsFancyText(): Boolean =
PacketEvents.getAPI().serverManager.version.isNewerThanOrEquals(ServerVersion.V_1_20_3)
private fun clientVersion(viewer: Player): ServerVersion =
PacketEvents.getAPI().playerManager.getClientVersion(viewer).toServerVersion()
private fun sendPacket(viewer: Player, packet: PacketWrapper<*>) {
PacketEvents.getAPI().playerManager.sendPacket(viewer, packet)
}
}
// NOTE (AI): createObjective (lines 46-68) emits an S3B CREATE objective followed by an S3D display bind; removeObjective (lines 74-84) emits an S3B REMOVE. The remaining methods maintain the S3C score rows that populate the sidebar.Related Packets
Wiki Cross-Reference
Action byte drives it: 0 create objective, 1 remove, 2 update display. Name capped at 16 chars.
Create/update also carry display text (32-char cap) and render type integer or hearts; remove sends name plus action byte only.
MCP 1.8.9 S3BPacketScoreboardObjective implements Packet
1.8.9 callers: ServerScoreboard.onObjectiveDisplayNameChanged sends new S3BPacketScoreboardObjective (line 132): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/scoreboard/ServerScoreboard.java
Cross-checked against minecraft.wiki (CC BY-SA 3.0) for 1.8.9 accuracy.
Vanilla Internals
Full 1.8.9 logic-class sources that send or handle this packet, stored verbatim.