Punishments 3.3.4
Back with another massive update, folks; this update primarily focuses on tech debt and updating older systems and internals to newer and better things.
Configuration
settings.json
The oldsettings.jsonfile is now calledmain.yml; all current settings will automatically be converted by the plugin on startup.
punishments.yml
The oldpunishments.ymlfile has been merged intomain.yml; the plugin on startup will automatically convert all current settings, and thepunishments.ymlfile will be deleted afterward. It is recommended that you back up these files.
Menus
All menus were converted to the new configuration system but will keep their original file names and override current settings. It is recommended that you back up these files.
Why?
As stated at the start of the post, the main reason is tech debt. The configuration system I used is not the best and doesn't automatically add any new entries when I add things to the configuration. I have migrated to a new configuration system called ConfigLib, which is a Java Object to Yaml mapper, so any new "config" entries I add internally will automatically be mapped and added to existing user configs so you will no longer have to reset or manually add any new entries to your configuration files.
Other Changes
- The plugin now requires Java 21
- Fixed some menu consistencies with Bedrock and Java users who have the same name (meaning both a Java and a Bedrock account exist with the username "bob123").
Additions
- Separated the record menu from the history menu configuration and added its configuration files.
- Added the ability for record menus to have a single GUI instead of a categorized sub-menu system like the history menu. This will require changing
record-menu-categorizedtofalseinmain.yml.
When the punishment category in the punishment ladder is KICK or WARN, the reason formatting would be weird and would start with "1s" for some reason! So, it would break the punishment chain and not be counted towards punishments.
[PATCH] Patched a bug where when you have filter-revoked-punishments enabled, it will entirely screw up the calculations
[FEATURE] Added a feature in the history menus where it will automatically open the history main menu when you exit the history menu!
This update completely revamps the message system for the plugin to a commonly used format called MiniMessage.
Using this system will now allow you to fully customize your plugin messages, along with supporting PlaceholderAPI. With this update, PlaceholderAPI is now a required plugin to run Punishments. This change should not be a problem for anyone because PlaceholderAPI is a commonly used plugin.
However, this update will require users to re-configure their messages.yml file; this update will not break the file; it will just remove the color code formatting due to MiniMessage's dedicated syntax.
I have taken the liberty for users who use the default configuration for messages to directly copy and paste these new changes using this link
For users not familiar with MiniMessage or needing additional resources to convert their files, please check out the following links:
Punishments 3.1.2 - Notes
The primary focus of this update is the very long-awaited addition of a feature I call "notes," what a note is, is a note bound to a user's account, which will allow staff to share information about a user without much hassle.
Staff members are also notified when a user with a "severe" note joins the server. This can be toggled off using a command.
You can store the note data locally or globally using a MySQL database, by default the data source is set as an SQLite database, meaning it's stored in a file and not a database! To change this, go tosettings.jsonand turnlocal-databaseto false, then enter your database information.
If you wish to disable the notes feature entirely, turnenabledtofalse, but is enabled by default!
Commands
-/note <username>or/notes <username>- View, edit a user's notes and also add a note to a user
-/togglenotenoticeToggle "note notices" which allows a staff member to be notified when users with "severe" notes join the server.
Permissions:
punishments.notes| Ability to use the/notescommand.punishments.notes.notice| Ability to use the/togglenotenoticecommand and also be able to see note notices.
Other Changes
- Changed the way that the configuration system recognizes the filler integer list. You can now place a-between two numbers to fill the slots between one number and another instead of needing to fill in each number individually.
Example:
Code:# "Fillers" are used to essentially make menus look fancy. fillers: BLACK_STAINED_GLASS_PANE: # The material of the filler - "0-10" # Fills in the slots from 0 to 10! - "12" - "14" - "16-26"
After the last patch, another NPE appeared, and I found and fixed the issue. It should not be a problem anymore.
I fixed a NullPointerException when the staff leaderboard attempts to cache the staff member's unique IDs.
Fixed an issue in plugin.yml which wouldn't allow the plugin to be used in older versions (1.19, etc). While the plugin can be used in older versions doesn't mean it shouldn't be! I designed this plugin for the latest version of the game only! Using older versions that are not supported would possibly mean some feature may or may not work as intended.
