
CombatGunSSS
CombatGunSSS - мощный плагин для Minecraft 1.21+, добавляющий 46 видов оружия с реалистичной отдачей, хитсканами и продвинутым крафтом. Идеально для тактического PvP.
Оцените первым
1.8K
6
Список изменений
[2.0.6] - 2026-05-14
Fixed
🔴 GunListener.isFriendlyFire() — Scoreboard team detection using wrong scoreboard (Critical)
- Root cause:
shooter.getScoreboard()andtargetPlayer.getScoreboard()return each player's personal scoreboard view, which may differ between players when a scoreboard plugin assigns individual views. Team membership is defined on the main scoreboard, so using a personal scoreboard could returnnulleven when both players are on the same team — or vice versa, allowing players to bypass friendly-fire restrictions. - Fix: Replaced both
player.getScoreboard()calls with a singleBukkit.getScoreboardManager().getMainScoreboard()lookup. Team membership is now always evaluated against the authoritative server scoreboard.
🔴 GunListener — Memory leak in recentDamage map (Critical)
- Root cause:
recentDamageentries were only evicted bypruneRecentDamage(), which runs after each shot. Players who disconnected (crash,/kick, network drop) or died without triggering a subsequent shot by another player left staleDamageRecordentries in the map indefinitely, growing unbounded on long-running servers. - Fix: Added
recentDamage.remove(p.getUniqueId())to bothonQuit()andonDeath()event handlers, ensuring entries are cleaned up immediately when a player leaves or dies — in addition to the existing TTL-based pruning.
🟡 GunListener — Shared static Random causes thread contention and predictable spread (Medium)
- Root cause:
private static final Random RANDOM = new Random()is shared across all usages ofGunListener. Java'sRandomis thread-safe via internal synchronization, which causes lock contention when multiple players fire simultaneously, and its LCG algorithm produces correlated sequences when called rapidly — making bullet spread slightly predictable. - Fix: Replaced the shared field with a private helper
rng()that returnsThreadLocalRandom.current(). Each thread gets its own independent, higher-quality RNG with zero contention. All threeRANDOM.nextDouble()call sites updated torng().nextDouble().
🟡 StatsManager — Unsynchronized async DB access on shared connection (Medium)
- Root cause:
flushBuffer()issynchronizedon theStatsManagerinstance, butincrementGunKill()andgetGunKills()— both called from async tasks — are not. All three methods share the same JDBCConnection. Concurrent execution offlushBuffer()andincrementGunKill()could interleave SQL transactions, causingSQLITE_BUSYerrors, corrupted auto-commit state, or inconsistent read results ingetGunKills(). - Fix: Marked both
incrementGunKill()andgetGunKills()assynchronized. All three DB-touching methods now synchronize on the same monitor (theStatsManagerinstance), serializing access to the sharedconnectionwithout requiring a connection pool.
Файлы
CombatGunSSS-2.0.6.jar(12.92 MiB)
ОсновнойМетаданные
Канал релиза
Release
Номер версии
2.0.6
Загрузчики
BukkitPaperPurpurSpigot
Версии игры
1.21–1.21.11
Загрузок
75
Дата публикации
14.05.2026
