
OnePVP
Functional and lightweight PVP plug for servers with Purpur/Paper technology... Maximum lightness, with immense functionality and more.
Список изменений
🚀 OnePVP Update Summary
This update focuses on stability, compatibility, and resolving several critical issues discovered during testing. Multiple systems have been rewritten to eliminate problems introduced by decompiled code, resulting in a more reliable and production-ready PvP experience.
🐛 Bugs Fixed 🔴 Critical Bug #1 — /pvpglobal on Did Not Work Properly
A major issue was found in PvpGlobalCommand.java.
Problem
The decompiled Java switch statement generated by CFR contained faulty logic. The "on" case never actually assigned the value true to the enable variable, while the default case always assigned false.
As a result:
/pvpglobal on behaved exactly like /pvpglobal off Global PvP could never be reliably enabled Administrators experienced inconsistent behavior Fix
The entire switch structure was rewritten using a clean implementation.
Supported values now correctly enable Global PvP:
on enable activate true
Global PvP now behaves exactly as intended.
🔴 Critical Bug #2 — New Players Joined With Incorrect PvP Status
This issue affected players joining while Global PvP was active.
Problem
The join listener processed individual PvP notifications before checking whether Global PvP was enabled.
For new players, this resulted in contradictory behavior:
Players received messages indicating that PvP was disabled. Global PvP immediately forced PvP on afterward. Icons and notifications became inconsistent. Fix
The onPlayerJoin logic was completely redesigned with a clear priority order.
New Join Flow 1️⃣ Global PvP Enabled + Force on Join PvP is immediately enabled. New player protection is removed. Global notifications are sent. Players receive the correct PvP indicators. 2️⃣ Global PvP Enabled Without Force Players are notified that Global PvP is active. Standard PvP logic continues normally. 3️⃣ Global PvP Disabled The original join flow is executed. Individual PvP settings behave as expected.
This eliminates conflicting messages and confusing states.
🔴 Critical Bug #3 — /pvp on Did Not Activate PvP
The same switch issue discovered in Global PvP was also present in:
PvpCommand.java OPvpCommand.java Problem
Commands such as:
/pvp on
would fail to correctly enable PvP.
Fix
Both command handlers were rewritten using standard Java logic.
Supported activation arguments now function correctly:
on enable activate true
Players can once again reliably toggle PvP status.
🟡 Medium Bug #4 — Confusing Toggle Logic
A problematic implementation was found in:
PvpManager.togglePvp() Problem
The previous code used ambiguous assignments that could lead to:
Unpredictable results Difficult debugging Potential NullPointerException situations Fix
The method was rewritten using explicit if/else conditions.
Benefits include:
Improved readability Easier maintenance Safer execution Predictable PvP toggling 🟡 Medium Bug #5 — Invalid Decompiled Code in DataManager
An issue was discovered in:
DataManager.java Problem
The CFR decompiler generated malformed Java code containing orphaned finally blocks without matching try statements inside loadClans().
This caused:
Compilation failures Unusable source code Difficult maintenance Fix
The entire loadClans() method was rebuilt using proper Java practices.
Improvements include:
Correct try-with-resources Cleaner code structure Better reliability Java 17 compatibility 🟡 Medium Bug #6 — Generic Type Compilation Errors
A typing issue was found within:
RankManager.java Problem
Iterations over ranking data used raw Map.Entry types instead of explicit generic declarations.
This caused compilation errors and unsafe operations.
Fix
Generic typing was corrected to:
Map.Entry<String, Object>
Benefits:
Type safety Cleaner compilation Improved maintainability 🟡 Medium Bug #7 — Java 21 Syntax on a Java 17 Project
Compatibility problems affected:
ClanCommand.java ClanMenuGUI.java Problem
The decompiled source contained syntax such as:
case ClanData.Role.LEADER ->
which requires newer Java versions and is incompatible with the project's Java 17 target.
Fix
The affected switches were rewritten using traditional Java 17 syntax.
Benefits include:
Full Java 17 compatibility Stable builds Improved cross-environment support ⚙️ Technical Improvements
This update also delivers several behind-the-scenes improvements:
✅ Cleaner command handling logic ✅ More predictable PvP behavior ✅ Improved Global PvP synchronization ✅ Better onboarding for new players ✅ Safer clan data loading ✅ Enhanced code maintainability ✅ Stronger Java 17 compatibility ✅ Elimination of multiple decompiler-related issues 🎯 OnePVP Is Becoming More Stable
These fixes address some of the most important issues reported during testing and significantly improve the overall reliability of the plugin.
With PvP commands functioning correctly, Global PvP behaving consistently, clan systems compiling properly, and decompiler-related problems eliminated, OnePVP continues moving toward a more polished and release-ready experience.
Thank you to everyone testing and reporting issues. Your feedback helps make OnePVP stronger with every update.
