Skip to content

2.6.0 json cleanup#146

Closed
BoyStijn wants to merge 54 commits into
Tradeshop:masterfrom
BoyStijn:2.6.0-JSON-Cleanup
Closed

2.6.0 json cleanup#146
BoyStijn wants to merge 54 commits into
Tradeshop:masterfrom
BoyStijn:2.6.0-JSON-Cleanup

Conversation

@BoyStijn
Copy link
Copy Markdown

Pull Request Etiquette

There are several guidelines you should follow in order for your Pull Request to be merged.
Replace [ ] with [x] to cross the checkbox.

It is sometimes better to include more related changes in a single commit.
If you find yourself having an overwhelming amount of commits, you
can rebase your branch.

Changes

Removed unused (de)serialization methodes

  • removed java.io.Serializable interface from classes
  • removed serialization method from classes (or changed to toString if the method was used)
  • removed deserialization method from classes (or changed to fromString if the method was used)

KillerOfPie and others added 30 commits May 24, 2022 18:25
- Improvements to Setting Section comparison code(due to errors when ne ones were added) should be a lot beefier and handle any future additions without problems
- Added configurable default item settings and ability to disable editing of individual item settings
- Added type checking to ObjectHolder
- Moved State String generation to ShopItemStack
- ShopItemStack Settings are ignored if not set to UserEditable in the config(uses default setting instead)
- Moved #createShop to Utils
- Made #createShop more generic so sign creation and commands could both use it
- Added SHOP_CREATION Debug Level at bit 11(1024)
- Added toDebug method to Shop to allow a easily readable output of the shop
- Re-wrote updateSign methods to make them simpler to understand and allow sign/event passing from #createShop
- Removed event storing and related methods from Shop as it was unnecessary
- Deprecated #b64OverstackFixer since it is only used in legacy code
- Fixed some spelling in comments(the green underlines were bothering me)
- Removed unused `failed` methods from Utils
- Added configurable colours for the middle lines on trade sides per material type Tradeshop#135
- Removed Message call in CommandRunner that should never be used and would never actually send if it was.
- Added SET_MANAGER and SET_MEMBER commands to the autofill for player names
- Added Config support for map values so individual setting enums are not required for settings that may change(like sign types), This should automatically add new items to existing maps as well
- Changed SettingSection weights to start at 50 increments based on nest depth to make them more easily readable
- Changed Member and Manager Lists into Sets to prevent Duplicates(hopefully)
- Added Shop#saveShop with a boolean parameter so that conditional saves don't need a separate if statement
- Removed Wall sign types since each sign type is handled the same whether it is on a wall or not
- Adjusted sign code to properly handle above
- Fixed error in ShoptradeListener where shops in the OOS state but without a product would try to check on stock.
- Added conditional saving for Setting and Message files
- Added thorough change detection for setting defaults and upgrades to prevent unnecessary saves and fix bug preventing changes to default sign colours to be changed from their default values
- Fixed bug preventing setUser commands from working due to failed removal(which wasn't necessary for the set to process)
- Added missing return in ShopTradeListener which caused `OOS` code to run after `Incomplete` code in a switch
- Fix for my stupid debug output
- Fix for more stupid mistakes
- Removed `Internal Permissions` as it is replaced by `Registered Permissions` Tradeshop#138
- fixed phrasing in `NO_TRADE_PERMISSION` pre-comment and `NO_TS_CREATE_PERMISSION` default message
- Prevent NONE permission from registering
- Added Permission registration debug to STARTUP level
- Fixed many places where getUsersUUID was not provided with which roles to get users for
- Fixed not checking for Create permission in CreateShop method allowing anyone to create and shop type by placing the sign
- Remove `Player Level` command
- Fix for double message when shop could not be found during ShopUserCommands
- Added all as an option for targeting all shops when using ShopUserCommands
- Mapped Setting now supports nested maps(so section > setting groups can be generated) this has no limit but cannot be changed externally so it should be fine and not encounter any un-ending loops
- Changed Per-Item settings to use Mapped values instead of individual settings and sections
- Changed ShopItemStackSettingKeys to load settings on each get call rather than when enums are created(since I think the latter could have problems when reloading)
- Remove Debugger from utils to prevent early access
- Add in server default and user-editable settings for per-shop settings including hopper import/export and no-cost
- Update old values into new locations including no-cost-text, no-cost-amount, and existing hopper settings
- Fix for improper mapped settings writing
- Remove hopper settings from Metrics, need to add back before 2.6.0
- Add in asType settings to ObjectHolder so conversion code doesn't need to be added after retrieval.
- Changed old makeReadable Code to utilize WordUtils.
- Removed getString from ShopType to avoid early setting calls, replace with Setting enum value
- Add try/catch to skippableHoppers boolean updater to avoid early settings call
- Call updateSkippableHoppers a second time after settings has been fully initiated
- Add ShopSettingKeys
- Add Edit Settings GUI to `/ts edit` menu
- Added skippableShop cache so shops can be handled with a different time values and be removed when  their settings are changed and should be reprocessed.
- Added try/catch for IlleaglWorldException to PlayerSetting#getInvolvedStatus methods to prevent error when trying to load shops from unloaded worlds
- Fix for null appearing on shop sign lines 2/3 due to color being added
- Change availableTradeAmount for iTrade Shops to be 999
- Change updateStatus to change to OPEN when availableTrade > 0
- Change getFullTradeCount to check if costs can be traded on BiTrade Shops when no Product is in stock
- Change Hopper protection to not skip shop hoppers(code is commented out dependent on input)
- Add delayed Shop sign and available trade update on inventory close(when it is a shop inventory)
- Changed trade and trade check code to support new noCost setting
- Fix for bug reported by LewisB1#9506 on Discord where errors were being caused by old shops that required `/ts what` to view.
- Proper fix for null appearing on signs(was due to the new sign color settings not being loaded)
- Changed serialized value for ObjectHolder so data storage is more readable
- Fix for bad data on a shop sign(That side of the trade will more than likely be removed)
- Dry'd Line formatting on signs for lines 2/3
- Added serialized name for `itemSettings` to properly read in the object with the old `shopSettings` name
- Added method to add ItemStacks to an inventory while temporary setting the inventories Max Stack Size to prevent overstacking items(May add as a shop setting in the future)
- Added updateFullTradeCount and updateSign to what command
- Fix for Members displaying in shops and Member & Manager.
- Fix for `/ts removeUser` not filling TabComplete for players.
- Fix for double space in Message output between the Prefix and Message.
- Updated plugin versions in POM.xml
- Fix for non DATA_ERROR debug output
- Moved inventoryGUI to a local directory instead of it's own to prevent potential conflicts
- Fix for add Error during shop creation when adding users.
KillerOfPie and others added 24 commits July 4, 2022 16:25
- RemoveSide commands now default to the only item if no index was specified and the shop only has one item on the side
- Fix for members showing up as managers in the         edit menu
- Fix for managers not showing in edit menu
- Minor Testing done seems Okay
- Adds support for checking all 26 spots around a sign
- Checks for Chests/Signs based on the direction for the block
- Directions in the config should be formatted as `dir1+dir1+dir3` i.e `BACK` | `BACK+DOWN` | `LEFT+DOWN+BACK`
- There is no limit to the amount of directions(other than not being able to repeat a direction) but only 3 are needed to check specif the surrounding 26 blocks
- Moved RelativeCardinals to be nested in RelativeDirection
- Change allowed-directions in lang to chest-directions
- Updated comment for above to be more descriptive of usage and options
- Add SQLITE option to data-storage-type pre-comment
- POM Version updates
- POM Improvements
- Added `Clean` and `skipDocs` profiles for maven builds
- Moved `original` and JavaDocs output to `target/output-Files` sub folders
- Updated JavaDoc exclusions
- Excluded `META-INF/maven` files from builds
removed java.io.Serializable interface from classes
removed serialization method from classes (or changed to `toString` if the method was used)
removed deserialization method from classes (or changed to `fromString` if the method was used)
@BoyStijn BoyStijn mentioned this pull request Nov 26, 2022
2 tasks
@SparklingComet
Copy link
Copy Markdown
Member

SparklingComet commented Nov 26, 2022

We are not merging into master, but into 2.6.0. I am assuming you forked TradeShop:2.6.0 anyway. Could you please resubmit?

@BoyStijn
Copy link
Copy Markdown
Author

My bad

@BoyStijn BoyStijn closed this Nov 26, 2022
@SparklingComet
Copy link
Copy Markdown
Member

Future reference: resubmitted in #147 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants