Fix critical bugs and improve code quality
Generator & Modes: - Fix potential NPE in ParkourGenerator zone initialization - Add null check in BlockPlacer.placeNormalBlock() - Fix unsafe Map operations in CoopMode.score() - Add session validation in RaceMode delayed reset - Extract magic number to constant in SpeedrunMode (TICKS_PER_SECOND) - Add world bounds checking in ElytraRingGenerator - Fix map normalization in GeneratorProfileManager (handle zero sum) - Complete schematic implementation in BlockPlacer Storage & Database: - CRITICAL: Fix connection leak in SQLConnectionManager - Add proper try-with-resources for Connection in SQLQueryExecutor - Deprecate unsafe prepareStatement() method - Add documentation about connection management Session & Player: - Optimize muted users count calculation in SessionStateManager All changes tested and verified with build + tests passing.
This commit is contained in:
parent
46f7b794c6
commit
9864fd6e30
10 changed files with 63 additions and 38 deletions
|
|
@ -93,7 +93,7 @@ public class SessionStateManager {
|
|||
* Get muted users count.
|
||||
*/
|
||||
public int getMutedUsersCount() {
|
||||
return (int) mutedUsers.values().stream().mapToInt(muted -> muted ? 1 : 0).sum();
|
||||
return (int) mutedUsers.values().stream().filter(muted -> muted).count();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue