File Details
rpessentials-4.1.9.jar
- R
- May 15, 2026
- 479.67 KB
- 20
- 1.21.1
- NeoForge
File Name
rpessentials-4.1.9.jar
Supported Versions
- 1.21.1
Curse Maven Snippet
[4.1.9]
Self-assigned nickname system via /rp selfnick with configurable restrictions and cooldown management. License card visual overhaul with physical in-hand rendering and a dedicated inspection screen.
Added
Command
/rp selfnick [nickname]: New command allowing players to manage their own display name.- Executing without arguments resets the nickname to the original player name.
- Integration with
NicknameManagerfor persistent storage and display across the server. - Command logging: Every nickname change is logged to the console via
RpEssentials.LOGGERwith the format[SELFNICK] {player} set nickname to '{nick}'.
Configuration Section [Self Nick]: Added a dedicated category in
RpConfig.javafor fine-grained control:enableSelfNick: Boolean to toggle the feature globally.selfNickCooldownSeconds: Integer to define the delay between two nickname changes (default: 300s).selfNickAllowColors: Boolean to allow or forbid the use of&or§formatting codes.selfNickMaxLength: Integer to limit the length of the chosen nickname (default: 24).
New Message Keys: Added 5 configurable entries in
MessagesConfig.java:selfNickSet: Success message (placeholder:{nick}).selfNickReset: Confirmation message when clearing the nickname.selfNickDisabled: Error message when the feature is toggled off.selfNickColorsDisabled: Error message when a player tries to use color codes illegally.selfNickTooLong: Error message for exceeding the character limit (placeholder:{max}).
License Card — Physical in-hand rendering: The license item now renders as a physical card held in first-person, replacing the default 3D item model.
LicenseCardRenderer: new class that renders the card background texture (textures/item/license_card.png) and overlays all text fields in world space: profession, holder name, issue date, optional expiry date, and a valid/revoked status line at the bottom.MixinItemInHandRenderer: injects intorenderHandsWithItemsto fully replace the vanilla first-person render when aLicenseItemis held. Preserves vanilla head-bob and pitch tilt, renders both player arms using the existingPlayerRenderer, then delegates card drawing toLicenseCardRenderer.LicenseItem.initializeClient: registers aIClientItemExtensionsthat hooksapplyForgeHandTransform, delegating toLicenseCardRenderer.applyCardTransformfor a map-like hand positioning (slight tilt, centered in front of the player).
License Card — Inspection screen: Right-clicking a license item in the main hand opens a dedicated full-screen GUI.
LicenseScreen: draws the samelicense_card.pngtexture as a large background (280x200 px), then overlays all metadata fields with the same layout as the in-hand renderer. Shows the revoked/valid banner at the bottom. A single Close button dismisses the screen.LicenseClientHandler: listens toPlayerInteractEvent.RightClickItemclient-side and opensLicenseScreenwhen aLicenseItemis detected in the main hand.
Fixed
- Server crash on player logout:
RpEssentialsMessagingManager.clearCache(player.getUUID())was called inonPlayerLogoutbut the method did not exist under that signature. Renamed/aligned the call to match the actual method, preventing aNoSuchMethodErroron every player disconnect.
Technical
RpCooldownManagerintegration: Addedselfnickcase to thegetCooldownMs()switch block, mapped to the newRpConfig.SELF_NICK_COOLDOWN_SECONDSvalue. Command execution is blocked ifisOnCooldownreturns true, displaying the standard remaining-time message.Nickname validation logic:
- Color stripping: Length validation uses
finalNick.replaceAll("§[0-9a-fk-orA-FK-OR]", "")to prevent bypassingselfNickMaxLengthwith hidden formatting characters. - Color conversion:
&codes are converted to§only whenselfNickAllowColorsis enabled. - Empty check: Setting a nickname that consists solely of color codes or whitespace is rejected.
- Color stripping: Length validation uses
Robustness: Config getters are wrapped in
try-catch (IllegalStateException)to prevent crashes during early startup or config reload phases. The/rp selfnickcommand requiressrc.getEntity() instanceof ServerPlayerto block console execution.New classes:
LicenseCardRenderer— world-space card rendering, reused by both the in-hand mixin and the GUI screen.LicenseClientHandler— client-side event subscriber that opensLicenseScreenon right-click.LicenseScreen— full-screen license inspection GUI.MixinItemInHandRenderer— first-person render override forLicenseItem.
Modified classes:
LicenseItem— addedinitializeClientoverride to registerIClientItemExtensionsfor the hand transform hook.RpConfig— new[Self Nick]section with four config values.MessagesConfig— five new[Self Nick]message keys.RpCooldownManager—selfnickcase added togetCooldownMs().RpEssentialsRpCommands—/rp selfnicksubcommand registered.
New mixin:
MixinItemInHandRendererregistered inrpessentials.mixin.jsonunderclient.

