Commit Graph
2066 Commits
Author SHA1 Message Date
YoyoNow a9fbb4cd8d Combine techhider, xray and hullhider scoreboard lines
As only one of /techhider, /xray and /hullhider can be active per region,
the scoreboard shows them in a single "View" line naming the active one.
2026-10-31 15:36:02 +01:00
YoyoNow f02f356b2b Add /hullhider to BauSystem
/hullhider hides the inside of the build area hull of a region from the
players who toggle it, like the hull hider of a fight. Each region gets its
own hull while somebody uses it; it is rebuilt every time somebody enables it,
as WorldEdit and Axiom changes do not update it. /techhider, /xray and
/hullhider exclude each other per player and region.

Which players may see the hull contents is now decided by Viewers, a sealed
class with HiddenByDefault (fight) and VisibleByDefault (bau). Added players
are stored in a set; isViewer alone defines what being added means.
2026-10-31 15:32:18 +01:00
YoyoNow d1fb4ca67e Allow removing hulls and resend their chunks
HullHider#removeHull stops hiding a hull: it shows the entities and REntities
the hull hid and resends its chunks to everybody who could not view it. A hull
is enabled again by adding and initialising it.

Hull#resendChunks only resends chunks the player has loaded. HullHider now
resends the chunks to non-viewers after initialising a hull itself, so
FightHullHider no longer does it.
2026-10-31 15:09:04 +01:00
YoyoNow ce2a23f4b8 Migrate BauSystem to the new TechHider and remove the legacy TechHider
The new TechHider registers a permanent global filter, so BauSystem now uses
a single BauTechHider that combines the hiding rules of the spectator
techhider, /techhider and /xray per player. To support the different
obfuscation blocks of these rules, ForPlayer now provides the obfuscation
block per position.

The ChunkHider now also checks single valued chunk sections, which were sent
unfiltered before, and recalculates their block count if they change.
Unhandled packet types are logged once; statistics, debug samples and ping
responses are passed through.

The legacy TechHider and its access widener entries are removed.
2026-10-31 15:00:37 +01:00
YoyoNow 7d4252325a Extract obfuscation config into HiderCore
ObfuscationConfig resolves the hidden blocks, block states (including all
waterlogged states when water is hidden) and block entity types plus the
obfuscation block, either from a gamemode's techhider config or from plain
materials. TechHiderWrapper now only contains the fight specific access rules.
2026-10-31 14:50:32 +01:00
YoyoNow da4b684a4b Move Hull and generic HullHider into HiderCore
Hull no longer depends on FightSystem: plugin, world, region, ground
visibility and hidden blocks are passed in. HullRegion is the common block
box hulls work on. The generic HullHider<K> manages one hull per key and does
the block, entity and REntity tracking; FightHullHider keeps the fight
specific parts (team hulls, viewer rules, state dependent registration).

Entities are now checked against the hull with block coordinates, so entities
in the bottom layer and at the max z edge are handled correctly.
2026-10-31 14:49:00 +01:00
YoyoNow a3a97ee102 Move TechHider into new HiderCore module
HiderCore holds the TechHider, ChunkHider and AccessPrivilegeProvider so that
FightSystem and BauSystem can both shade it. BlockIds and ProtocolUtils stay in
SpigotCore (used by AntiNocom and RFallingBlockEntity) and move to
de.steamwar.core to avoid a split package. The access widener entries the
TechHider needs are duplicated into hidercore.accesswidener; the legacy
TechHider still needs its own copies in SpigotCore.
2026-10-31 14:44:55 +01:00
YoyoNow b8f61658f4 Cleanup Laufbau 2026-10-31 14:23:29 +01:00
YoyoNow 54f1ae0388 Merge pull request 'Hull hider fixes' (#517) from HullHiderFixes into main
Reviewed-on: SteamWar/SteamWar#517
2026-10-31 12:53:16 +01:00
YoyoNow fc090c2b48 Remove Hull primary direction 2026-10-31 12:49:28 +01:00
YoyoNow 6c99f1f9c9 Resend hull chunks to non-viewers after hull initialisation
Chunks encoded while the hull was filled as hidden contain obfuscated
blocks that become visible after initialize, and no block update is
generated for them. Reload the team's extend region for all players
that cannot see the hull.
2026-10-27 10:12:07 +01:00
YoyoNow ac7dc2d2d5 Use Mth.floor instead of int casts for TechHider coordinates
(int) truncates toward zero, so negative coordinates were checked
against the wrong block. Matches the server's block position math.
2026-10-27 10:10:18 +01:00
YoyoNow 865d28645a Stop filtering remove-entity packets in TechHider
Stripping ids of hidden entities left ghost entities on clients once
the entity became visible and was later removed. Removing an unknown
entity id is harmless, so the packet is passed through.
2026-10-27 10:10:09 +01:00
YoyoNow b47cff2805 Make TechHider hidden regions consistent for spectators
Spectators hid HiddenBlocks in the whole arena for block updates, but
full chunk packets outside both extend regions were sent unfiltered, so
the same blocks were hidden or visible depending on the packet type.

Hidden regions are now a list: spectators hide both team extend
regions, team members the opposite one. Block checks and the per-chunk
bypass use the same regions, so everything outside the extend regions
is visible and unfiltered.
2026-10-27 09:58:16 +01:00
YoyoNow 7cd2e540ef Make TechHider access checks player-scoped
AccessPrivilegeProvider#forPlayer returns a PlayerAccess that resolves
the player's hidden region once. TechHider creates it once per outer
packet (shared across bundle sub-packets) and passes it to every
processor, so all decisions within a packet are consistent and the
region/referee lookup no longer runs per block on the netty thread.
2026-10-27 09:50:59 +01:00
YoyoNow 8381cacdf8 Avoid NPE race when computing the TechHider hidden region
getHiddenRegion looked the player up in FightTeam.players twice (team,
then FightPlayer) on netty threads. A concurrent reset or removePlayer
made the second lookup return null, the NPE was swallowed by the global
filter and the packet was dropped. Resolve the FightPlayer once and
derive team and canEntern from it.
2026-10-27 09:28:05 +01:00
YoyoNow 4943682a66 Filter entity event packets by entity id in TechHider
The processor for ClientboundEntityEventPacket used getEventId(), the
status byte (2 = hurt, 3 = death, ...), as the entity id. Events of
hidden entities therefore passed the filter, and events of visible
entities could be dropped when an unrelated hidden entity had the same
id. Use the entityId field instead.
2026-10-27 09:24:45 +01:00
YoyoNow 0ef702da9e Hide hulls from players by default in HullHider
Hull kept a set of affected players that was only filled by a join
listener active in the Schem states, so spectators joining earlier were
never hidden from the hull. The set was also a plain HashSet read on
netty threads, where a racing lookup meant "not hidden".

Invert it into a concurrent set of viewers (referees, own team, boarded
players); everyone else is hidden by default.

- Hull: viewer UUID set with addViewer/removeViewer/forgetViewer, a
  null player counts as hidden
- Hull: entities are hidden/shown when they enter/leave the hull for all
  non-viewer online players; uncovered blocks go to non-viewers
- HullHider: join/quit handled in a listener active in every state; quit
  clears the viewer entry
- HullHider: TeamDeathEvent re-hides the enemy hull and resends its chunks
- FightPlayer: stop the enter countdown before firing TeamDeathEvent so
  listeners see canEntern() == false
2026-10-27 09:23:31 +01:00
YoyoNow 2ea09eadb2 Fix command errors being hidden by generic help (#513)
Commands ending in a String... parameter are treated as help commands.
When such a command failed with an @ErrorMessage (e.g. /msg or /kick
with an offline player), the generic help matched next, printed the
usage and the collected error was never shown.

Stop before generic help (noTabComplete) if an earlier help command
already collected errors, and print those instead.
2026-10-27 07:40:06 +01:00
YoyoNow d32f5738fd Rework chat icon and name colors
- Mark the receiver's default channel with a green icon
- Show the TeamChat icon in yellow, all other channel icons in gray
- Use the rank prefix and rank color for sender names in TeamChat and
  ServerTeamChat, like in the global chat
2026-10-26 15:22:35 +01:00
YoyoNow 78669acef3 Merge pull request 'WaterRemover remove BubbleColums' (#514) from FightSystem/WaterRemover into main
Reviewed-on: SteamWar/SteamWar#514
Reviewed-by: YoyoNow <4+yoyonow@noreply.localhost>
2026-10-26 13:37:14 +01:00
Sakziea cb38460c4b Merge branch 'main' into FightSystem/WaterRemover 2026-10-26 13:26:31 +01:00
Sakziea a4e06bcfd5 Fix Bubble Colums get removed by WaterRemover 2026-10-26 13:23:07 +01:00
YoyoNow bfbf98c1d6 Fix GUI.schemDialog for overriden Public list 2026-10-23 11:05:28 +02:00
YoyoNow c4b46e4431 Add override for Publics in GameModeConfig.Schematic 2026-10-21 08:22:05 +02:00
YoyoNow c238b9bdf2 Improve CheckCommand 2026-10-21 08:02:05 +02:00
YoyoNow fec4007120 Merge pull request 'Fixed Replay not starting for Normal Users' (#510) from 12312/SteamWar:main into main
Reviewed-on: SteamWar/SteamWar#510
2026-10-20 19:37:39 +02:00
12312 11798c3ec0 Fixed Replay not starting for Normal Users
Fixed Replay not starting for Normal Users.
2026-10-19 22:19:33 +02:00
YoyoNow 9935ab785d Fix NoClipCommand 2026-10-19 11:21:15 +02:00
YoyoNow 8e3e71dd96 CLine: render as a single display shown by view distance
The line no longer needs start, middle and end parts that were moved
around the player. It is one display that is visible for a player as soon
as any chunk the line passes through is in their view distance.
REntity#canView now receives the chunk positions of player and entity.
2026-10-19 10:41:34 +02:00
YoyoNow 3fe2e006b9 REntityServer: use per-entity view range instead of chunk view distance
Entities now decide per player whether they are visible. REntity defaults
to the player view radius, RDisplay derives it from its viewRange (1 = 64
blocks) capped at the client view distance, so values like Float.MAX_VALUE
stay cheap. Changing the viewRange re-evaluates the viewers. Fixes #488
2026-10-19 10:40:03 +02:00
YoyoNow 9d5fcc07e8 Only notify the owner's dev server about Bauwelt member changes
Dev servers are registered per owner (lowercase username), so there is
no need to wake every dev server.
2026-10-19 10:25:42 +02:00
YoyoNow 0c3e63d521 Restore BauweltMember cache and notify all dev servers on member changes
getBauMember never read its cache after the Exposed migration, so every
scoreboard render hit the DB (Too many connections, #479). Cache by
(bauwelt, member) incl. negative results, evict on addMember/remove, and
send BaumemberUpdatePacket to the Bauserver and all dev servers (also on
addmember). BauMemberUpdate clears the cache itself to not depend on
handler order.
2026-10-19 10:24:41 +02:00
YoyoNow 27d260a8d2 Delete CRIU checkpoint on /bau delete
/bau delete only removed the world folder. The checkpoint of the build
server stayed in place, so the next start restored the old JVM state
against a freshly copied world (superflat world, plugins inactive).
Extract ServerStarter#checkpointDir and delete the checkpoint together
with the world.
Fixes #438
2026-10-19 10:14:10 +02:00
YoyoNow 37f017b84c Improve action bar loading bar for server start 2026-10-19 09:59:02 +02:00
YoyoNow 21d0a4359d Update .gitignore 2026-10-19 09:31:38 +02:00
YoyoNow 8318d408b6 Fix REntity relative move rotation in 1.21
Pass yaw before pitch to ClientboundMoveEntityPacket.Rot/PosRot and stop
converting the already byte-encoded rotation a second time.
2026-10-19 09:27:27 +02:00
YoyoNow d14ddc4fab Fix lag from PistonCalculator at high TPS
Bundle piston order recalculations into one run every 200ms (wall clock,
independent of TPS) instead of one full recalculation and entity rebuild
per piston/place/break event. Tracked pistons that get moved are removed
from the visualization instead of being moved along.

Fixes #227
2026-10-19 09:19:41 +02:00
YoyoNow 5cc5529533 Reenable ReplayCommand 2026-10-19 09:07:08 +02:00
YoyoNow 380693a2b7 Fix REntity position desync and velocity in 1.21 replays
Send ClientboundEntityPositionSyncPacket instead of the teleport packet so
relative moves keep working afterwards, and pass rotation in degrees.
Pass the velocity unscaled to Vec3 instead of pre-multiplying by 8000.
Fixes #247
2026-10-19 09:03:52 +02:00
YoyoNow 69aef9dfb6 Fix ClassCastException for replay player equipment
PacketProcessor passes Bukkit EquipmentSlots to REntity#setItem, which cast
them to the NMS EquipmentSlot. Take the Bukkit slot and map it to the NMS
slot when building the equipment packet.
2026-10-19 08:38:42 +02:00
YoyoNow 097df865e5 Resend replay player tab entry when skin arrives
RPlayer requests the skin asynchronously, so the first tab list packet is
usually sent without textures and viewers already in range kept the default
skin. Re-send despawn/delist/list/spawn to the current viewers once the
skin response is received.
2026-10-19 08:21:52 +02:00
YoyoNow 230f8c521a Use PistonStructureResolver in PistonCalculator
Numbering now comes directly from the vanilla resolver instead of a
custom breadth-first search, so the order matches the real move order
(including backtracking through slime/honey chains). The display of
more than 12 blocks is removed; a blocked piston is shown in red.

Refs: #158
2026-10-18 20:09:10 +02:00
YoyoNow 253a975c73 Show no player hover for players of the public team 2026-10-18 20:01:24 +02:00
YoyoNow 12dd46176b Suggest /team info SW when clicking the SW prefix 2026-10-18 20:01:19 +02:00
YoyoNow 2111d72387 Suggest /team info when clicking a team prefix
Clicking the team prefix in the global/local chat or an event team
prefix in the fight chat puts /team info <shorthand> into the chat
input; the hover explains the click.
2026-10-18 20:01:15 +02:00
YoyoNow 3aa471c3ab Read global chat on fight servers after /chat global join 2026-10-16 11:29:02 +02:00
YoyoNow 47557d7bb8 Keep global chat readable after writing into it on fight servers
Writing /global <text> on a fight server shows the global chat until
the player leaves the server or runs /chat global leave, without
changing the default channel.
2026-10-16 11:17:30 +02:00
YoyoNow 62850b2e11 Let moderators read all fight chats automatically
/chat arenas join|leave lets moderators read the fight and team chats
of every arena and event spectate server; the choice is saved across
relogs. /chat <arena> leave excludes a single arena for the session.
2026-10-16 11:09:52 +02:00
YoyoNow 7f47d687d3 Hide /chat msg from players without moderation permission 2026-10-16 11:09:45 +02:00