AdminShop Overhauled

AdminShop Overhauled

161k Downloads

Invalid account data in client.json files causes unexpected behavior

AmmoniumX opened this issue ยท 3 comments

commented

Describe the bug
Having a *_client.json file with an invalid default account can cause crashes and invalid accounts to be shown in shops
To Reproduce
Steps to reproduce the behavior:

  1. Go to /config/adminshop/
  2. Replace the content in any of the *_client.json files to an invalid account, such as one the player does not have access to.
  3. This will make the client "think" it has access to this account, and can crash when placing buyers/sellers

Expected behavior
The client should recognize this as an invalid account and reset it to the player's personal account

Minecraft Version: 1.19.2/1.19.4
Mod Version: 1.16

commented

I think you should save the *_client.json file in the World folder, it would prevent shipping the file with modpacks, because to do that you would have to expressely move it in the defaultconfigs folder (to be copied into the world folder). I hope I'm clear, feel free to tell me if you don't get my blabla ๐Ÿ˜„

commented

as we discussed, a config/adminshop/client/world name_client.json could be a good solution. And also, the adminshop-common.toml lines:

#Display configurations. Options for changing client view
[display_config]
	#Displays your current balance and gained balance per second in the top left corner
	"Balance Display" = true
	#If monetary values should be formatted as M/B/T/etc (Short) instead of Million/Billion/Trillion/etc (Full)
	"Short mode " = true

should be moved to a separate client config to allow pack developers removing it from the overrides folder

commented

Fixed in newest version