protectionblocks-1.0.10.jar
Curse Maven Snippet
What's new
π v1.0.10 β Admin block browser: search, teleport & live diag tooltip
Small but very focused release. The admin ConfigScreen now includes a full server-wide protection block browser right in the General tab β search by owner name, click a row to teleport (cross-dimension), hover to get the entire /protection diag output as a tooltip. No more running commands from chat and hunting down coordinates by hand when a player reports a fuel-consumption issue.
π In-GUI block browser (ConfigScreen β General tab)
Below the two existing General widgets there is now a searchable list of every protection block currently known by the server.
- Header + search input + refresh (β») β search filters live by owner name (contains, case-insensitive), no need to submit. The refresh button re-requests a fresh snapshot from the server for when a player just moved / broke / placed something.
- Scrollable card β each row shows owner name Β· tier Β· dim Β· x,y,z Β· fuel on a single line. The accent strip on the top edge of the card stays visible even when the first row is hovered (padded a few px inside).
- Mouse wheel scroll inside the card, with β²/βΌ indicators showing there is more content in either direction. Typing in the search input auto-resets scroll to the top so filter results always start at the first match.
- Click a row β teleport. The client closes the ConfigScreen and sends a
TeleportAdminPacketwith the target dimension + block position. Server validates OP + moves the player cross-dim to(x + 0.5, y + 1, z + 0.5)(one block above the cube, so you don't spawn inside it). - Hover a row β full diag tooltip with everything
/protection diagreports for that block:- Owner name + UUID + dim + tier + range
isActive(green true / red false)- Current fuel count & item
costPerMinuteβ effective items/min the ticker is applying, plus the derived "1 item β Xh Ym Zs" durationlastConsumeMsβ absolute timestamp + relative "hace Xh Ym Zs"gracePersonal / graceGlobal / graceEffectiveβ each with "restantes" or "expirado hace ..." formatting
π /protection list [player] β chat command with clickable coords
Same data as the GUI browser, but from chat for grep / log-scraping.
/protection list(OP-only) dumps every protection block in the server: header line per owner, then one row per block with dim + coords + tier + fuel./protection list <player>only lists that player's blocks.- Coordinates are clickable β clicking them runs
/execute in <dim> run tp @s x y+1 z, teleporting the OP cross-dimension. Hovering shows a tooltip with dim, pos, tier and fuel so you can preview before committing to the TP. - Owner names resolved through
server.getProfileCache(), falling back to the raw UUID if the player has never joined this server session.
π§ Under the hood
- New client-side cache:
ProtectionListState. Stores the lastSyncProtectionListPacketreceived. The ConfigScreen reads from it every frame (no rebuild on new sync). - 3 new packets in
NetworkHandler:RequestProtectionListPacket(CβS, OP-only, empty body)SyncProtectionListPacket(SβC, list ofEntryrecords: owner UUID + name, pos, dim, tier, fuel count/item, plus every diag field:isActive,protectionRange,costPerMinute,lastConsumeMs,personalGraceUntilMs,globalGraceUntilMs)TeleportAdminPacket(CβS, dim + pos; server validates OP andplayer.teleportTo)
DepositFuelPacket.broadcastStatestayed public from 1.0.9; nothing else changed on the fuel/consumption path.- New i18n keys in 5 languages:
protection_list_header,protection_list_search,protection_list_empty. - Tooltip rendered as the very last step of
ConfigScreen.render(aftersuper.render+ tabs + notifications + toasts) so it always overlays other UI β no more surprises with Z-order.
π¦ Compatibility
- Minecraft 1.20.1
- Forge 47.x (built against 47.4.8)
- Fully compatible with 1.0.9 worlds β no data migration.
Β© 2026 vicxelcode β MIT License
All Relations
- All Relations
- Embedded Library
- Optional Dependency
- Required Dependency
- Tool
- Incompatible
- Include
This mod has no related projects

