File Details
rpessentials-4.1.0.jar
- R
- Mar 17, 2026
- 328.30 KB
- 17
- 1.21.1
- NeoForge
File Name
rpessentials-4.1.0.jar
Supported Versions
- 1.21.1
Curse Maven Snippet
[4.1.0] - 2026-03-17
Admin GUI System — Two new in-game interfaces for server staff to manage professions and player RP profiles without editing config files.
Added
Admin GUI — Profession Editor: New in-game interface for creating and editing professions.
- Browse all existing professions in a scrollable left-panel list with item count indicator.
- Create new professions or edit existing ones with live preview.
- Fields: ID (locked after creation), display name, color selector.
- Color selector displays each option in its own Minecraft color with bold highlight on the selected one.
- Live name preview rendered in the selected color next to the color buttons.
- Per-profession restriction overrides split into four tabs: Crafts, Blocs, Items, Équipement.
- Dynamic autocompletion for restriction entries, populated from
BuiltInRegistries.ITEMandBuiltInRegistries.BLOCK— compatible with all loaded mods. - Wildcard entries (e.g.
minecraft:*_sword) fully supported. - Scroll indicator on the profession list shows remaining hidden entries:
▼ (N de plus). - Changes saved immediately to
rpessentials-professions.tomlon disk.
Admin GUI — RP Profile Manager: New in-game interface for configuring a player's RP profile in one click.
- Lists all currently connected players with their active nickname (if any).
- Select a player to load their current nickname, role, and primary license.
- Set nickname with color selector (10 colors, live preview with
→ colored name). - Set role via free-text field or one-click shortcut buttons built from the configured roles list.
- Select primary profession with
◀ / ▶navigation andN/Totalcounter. - Apply button sends all three changes to the server simultaneously.
- Scroll support for large player lists with
▼ (N de plus)indicator.
Keybindings: Two configurable key mappings added under the
Oneria RPcategory in Options → Controls.key.rpessentials.open_profession_gui— Open Profession Editor (no default key).key.rpessentials.open_player_profile_gui— Open RP Profile Manager (no default key).- No default bindings to avoid conflicts — staff assign their own keys.
New Packets (6 total):
RequestOpenGuiPacket(Client→Server) — Staff keypress triggers a request; server validatesisStaff()before responding.OpenProfessionGuiPacket(Server→Client) — Sends full profession list with all override data.OpenPlayerProfileGuiPacket(Server→Client) — Sends online player list, available professions, and available roles.SaveProfessionPacket(Client→Server) — Saves a created or modified profession to config.SetPlayerProfilePacket(Client→Server) — Applies nickname, role, and license to a target player.- All packets validated server-side with
isStaff()— client cannot bypass the permission check.
New Classes:
RpKeyBindings— Key mapping definitions, registered viamodEventBus.addListener().RpClientTickHandler— Client tick handler detecting key presses and sending request packets.ClientGuiOpener—@OnlyIn(Dist.CLIENT)indirection class to open Screens from packet handlers without loading client classes on the server.ProfessionEditorScreen— Full profession editor GUI.PlayerProfileScreen— Full RP profile manager GUI.- All five packet classes under
net.rp.rpessentials.network.
Lang keys (add to
fr_fr.jsonanden_us.json):key.categories.rpessentialskey.rpessentials.open_profession_guikey.rpessentials.open_player_profile_gui
Fixed
RpEssentialsPermissions— Server crash on login when LuckPerms is absent:checkStaffStatus()was callingLuckPermsProvider.get()inside acatch (Exception e)block.NoClassDefFoundErroris ajava.lang.Error, not anException— it was never caught, causing an unhandled crash that killed the server on every player login.- Fixed by adding an explicit
catch (NoClassDefFoundError e)before the existing exception catches. - LuckPerms imports removed from the class header and replaced with fully-qualified references inside the method body, preventing the classloader from attempting to resolve LuckPerms classes at startup.
Profession GUI — Config not persisted after save:
SaveProfessionPacketwas callingconfigValue.set()without callingconfigValue.save().- In NeoForge,
.set()only updates the in-memory value —.save()is required to write the change to the.tomlfile on disk. - All five
ConfigValuewrites (PROFESSIONS,PROFESSION_ALLOWED_CRAFTS,PROFESSION_ALLOWED_BLOCKS,PROFESSION_ALLOWED_ITEMS,PROFESSION_ALLOWED_EQUIPMENT) now call both.set()and.save()via the newsetAndSave()helper.
GUI Screens — All fields reset on every button click:
- All mutable form state is now stored in instance variables (
stateNick,stateName,stateRole,stateColorIndex, etc.). EditBoxwidgets usesetResponder()to update state on each keystroke without triggering a full rebuild.rebuild()is called only from button click handlers — never fromsetResponder().- Fields are restored from state on every
init()call, so clicking any button no longer clears typed text.
- All mutable form state is now stored in instance variables (
GUI Screens — Blur effect applied over the interface:
renderBackground()fromScreenwas being called, which applies Minecraft's background blur effect on top of all GUI content.- Fixed by overriding
renderBackground()with an empty body in both screens, and replacing the call inrender()with a manualg.fill(0, 0, width, height, 0x99000000).
Keybinding — Constructor error
Cannot resolve constructor 'KeyMapping(String, Type, Key, String)':InputConstants.UNKNOWNis aKeyobject, not anint.- Fixed by using
InputConstants.UNKNOWN.getValue()to pass the underlyingintto theKeyMappingconstructor.
Keybinding — Category and key names displayed as raw translation keys:
- Lang keys
key.categories.rpessentials,key.rpessentials.open_profession_gui, andkey.rpessentials.open_player_profile_guiwere missing from the language files.
- Lang keys
@EventBusSubscriber(bus = Bus.MOD/GAME)deprecation warnings:bus = EventBusSubscriber.Bus.MODandBus.GAMEare deprecated since NeoForge 1.21.1.RpKeyBindingsno longer uses@EventBusSubscriber—RegisterKeyMappingsEventis now registered viamodEventBus.addListener(RpKeyBindings::onRegisterKeyMappings)in theRpEssentialsconstructor.RpClientTickHandlerretains@EventBusSubscriberbut without thebusparameter (GAME bus is the default).
PlayerProfileScreen— Compile errorpackage net.rp.rpessentials.RpEssentialsConfig does not exist:PlayerProfileScreenis@OnlyIn(Dist.CLIENT)and cannot access server-side config classes.- Available roles are now sent by the server inside
OpenPlayerProfileGuiPacket(alongside professions and player data) and passed to the screen via constructor. RpEssentialsConfig.ROLESis read exclusively inRequestOpenGuiPacket.handlePlayerProfileGui(), which runs on the server thread.
Technical
- Enhanced Classes:
NetworkHandler— Five new packet registrations (twoplayToServer, threeplayToClient).RpEssentials— AddedmodEventBus.addListener(RpKeyBindings::onRegisterKeyMappings).RpEssentialsPermissions—checkStaffStatus()rewritten with three-tier catch (NoClassDefFoundError,IllegalStateException,Exception) and fully-qualified LuckPerms references.SaveProfessionPacket— NewsetAndSave()helper ensures everyConfigValuewrite is immediately persisted to disk.SetPlayerProfilePacket—applyRole()extracted as a private method, mirrors the logic of/rpessentials setroleexactly.OpenPlayerProfileGuiPacket— AddedList<String> availableRolesfield, serialized in the existingStreamCodec.
Security
- All five new packets validate
RpEssentialsPermissions.isStaff()server-side before processing. - Non-staff players receive no response and no error message — the GUI system is invisible to them.
- Config writes are only possible via server-side packet handlers — the client never writes directly to config.
Migration Notes
- No breaking changes — fully backward compatible with 4.0.1.
- No new config files.
- Add the three lang keys above to your
fr_fr.json/en_us.jsonif you use custom language files. - Clients connecting to a 4.1.0 server must also run 4.1.0 (new packet IDs).