Links
Tags
Creators
Details
4.1.9
Compatibility
Changes
[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.
Optional dependencies
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:yJ9CnauQ:Vl4mD4C1"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:yJ9CnauQ:Vl4mD4C1"
}

