Releases: boxbeam/RedLib
Releases · boxbeam/RedLib
Various improvements and fixes
- ProtectionType.CONTAINER_ACCESS now prevents hoppers from moving items into chests from outside a protected area
- Added static methods to ProtectionPolicy to register custom protections against multi-block and directional events
- Made methods on SQLCache synchronized
- Parsing for MID_VERSION was broken by the version string returned by spigot 1.18-pre5, now parses correctly again
Add more flexibility to ChatPrompt
- Can now pass null as the prompt to not show a prompt message to the player
- Can now pass a boolean to specify whether the cancel message should be shown to the player
- Bugfix for PaginationPanel#addSlots(int, int, int, int)
Fix shift-click insertion order for open gui slots
- Shift-clicked items will now enter an InventoryGUI into open slots in the order they were opened
- Added InventoryGUI#openSlots and InventoryGUI#closeSlots variants which fill a rectangular area with 2 x and y coordinates
Improvements to argument constraints
- Constraints can now be applied to flags
- ArgTypes can now specify an error message to be shown when a constraint fails
Add command argument constraints
- Command argument constraints allow you to apply additional filters per-argument with the same type
- You can specify your own constraint rules for your own argument types, but existing ones have been put in place for int, float, long, and double to specify min and max values
- Example is int<1,100>:num to limit from 1 to 100, or <,100> for up to 100, or <100,> for 100 or above
Various bugfixes for RedCommands
- Merged base commands now properly display help menus
- Merged base commands now properly display error messages when the command is misused
- Nested post-argument subcommands now display previous arguments in help menus properly
- Nested posted-argument subcommands followed by regular subcommands followed by more post-argument subcommands no longer break the command processor
- Does anyone other than me use these features?
Minor changes and fixes
- Made ProtectionType.INTERACT no longer prevent container access
- Fixed argument processing for nested post-argument subcommands
- Made SQLite connections enable foreign key constraints by default
Bugfixes for RedCommands, added new ProtectionTypes for structure growth
- The lambdas passed to ArgType#tabStream and ArgType#setTab can now safely return null
- Fix NPE that would occur when a command with a post-argument subcommand that had no hook was run directly
- Added ProtectionType.STRUCTURE_GROWTH, for when a structure (like a tree) is grown
- Added ProtectionType.STRUCTURE_GROWTH_IN, for when a structure who location is outside a protected area would create blocks within a protected area
- ProtectionType.GROWTH no longer prevents fire spreading, and ProtectionType.FIRE does
Add ProtectionTypes that respect where the event came from
- Added ProtectionType.FLOW_IN, which will only prevent liquids from flowing into protected regions, not from flowing within or flowing out of protected regions
- Added ProtectionType.PISTONS_IN, which will only prevent pistons from pushing or pulling blocks from outside of a protected region, not operating within one or pushing/pulling blocks outside
- ProtectionType.PISTONS is no longer included in ProtectionType.INDIRECT_PLAYERS, but PISTONS_IN is
More minor bugfixes for PaginationPanel
- Will no longer create a new blank page when the last page fills up if there is not an element to be placed on the next page
- PaginationPanel#clear will now properly remove all elements from the inventory