ChestShop-authors / ChestShop-3

ChestShop - the chest & sign shop plugin for Minecraft Servers running Bukkit/Spigot/Paper
https://dev.bukkit.org/projects/chestshop
GNU Lesser General Public License v2.1
271 stars 177 forks source link

Tax not working #254

Open Danrique opened 4 years ago

Danrique commented 4 years ago

Tax does not work.

First line of your Admin Shop's sign should look like this:

ADMIN_SHOP_NAME: "Servidor"

The economy account which Admin Shops should use and to which all taxes will go

SERVER_ECONOMY_ACCOUNT: "Danrique"

Percent of the price that should go to the server's account. (100 = 100 percent)

TAX_AMOUNT: 10

Percent of the price that should go to the server's account when buying from an Admin Shop.

SERVER_TAX_AMOUNT: 0

Amount of money player must pay to create a shop

SHOP_CREATION_PRICE: 200

How much money do you get back when destroying a sign?

SHOP_REFUND_PRICE: 0

How many decimal places are allowed at a maximum for prices?

PRICE_PRECISION: 2

With this config I should be able to retain in my account "Danrique" 10% of all money in trades betwen the players right?

It just not working...

I am using paper 1.14.3

Phoenix616 commented 4 years ago

Yeah that config should work. Please provide the missing information requested in the bug template.

Danrique commented 4 years ago

aw I found in the console:

WARN Could not add money to account of 8c939d8e-5e25-4fcc-bc7e-a73eedff363f/null.This is probably due to https://github.com/MilkBowl/Vault/issues/746 and has to be fixed in either Vault directly or your economy plugin.If you are sure it's not this issue then please report the following error.

I readed the link, and I use essentials as economy, how do I fix that?

DmitryRendov commented 4 years ago

the same for me

Plugin Version

[09:58:02] [Server thread/INFO]: ChestShop version 3.10-SNAPSHOT (build 151)

Plugin Config

https://paste.ofcode.org/329mmLUZ7tZwDTpGLpRGyiq

Server Version

CraftBukkit version git-Spigot-9de398a-8b09d98 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)

Server Log

2019/07/22 09:30:31 [ChestShop] I_Kaonashi_I bought 1 Shulker Box for 600,00 from Alexandrium at [survival] -17900, 75, -8054 2019/07/22 07:16:32 [ChestShop] Neondertal sold 9 Poisonous Potato for 45,00 to Admin Shop at [survival] -15308, 70, -1208 2019/07/22 07:16:32 [ChestShop] Could not get balance account of c796b66c-a367-3137-a9dc-55f2befab2b9/null.This is probably due to https://github.com/MilkBowl/Vault/issues/746 and has to be fixed in either Vault directly or your economy plugin.If you are sure it's not this issue then please report the following error. 2019/07/22 07:13:45 [ChestShop] Could not get balance account of c796b66c-a367-3137-a9dc-55f2befab2b9/null.This is probably due to https://github.com/MilkBowl/Vault/issues/746 and has to be fixed in either Vault directly or your economy plugin.If you are sure it's not this issue then please report the following error.

What other plugins are you running?

AntiAFKPlus, AntiWorldDownloader, AsyncWorldEdit, AutoMessage, BlockPluginz, BungeeTabListPlus, ChatGuard, ChestShop, ChunkSpawnerLimiter, ClearLag, DiscordSRV, dynmap, Essentials, EssentialsChat, EssentialsSpawn, FishinRoulette, GraviTree, GriefPrevention, GriefPreventionFlags, HolographicDisplays, IllegalStack, JDynmapGriefPrevention, Jobs, LagMonitor, LogBlock, LuckPerms, Multiverse-Core, Multiverse-Portals, NoSpawnerChange, PhantomAdmin, PlaceholderAPI, PlayTime, PlugMan, ProtocolLib, PvPToggle, TitleManager, TogglePvp, Vault, ViaVersion, WorldBorder, WorldEdit, WorldGuard

What is happening?

Admin Shop throws an error, taxes and balance of Admin account is being not changed.

Phoenix616 commented 4 years ago

Please make sure that the user that the server economy account belongs to logged in at least once or use an economy plugin/vault adapter that has proper UUID support.

DmitryRendov commented 4 years ago

it was first I was thinking about and I have no idea who has UUID c796b66c-a367-3137-a9dc-55f2befab2b9 since my Admin Shop user is "Demon" and his UUID [16:10:58] [User Authenticator #317/INFO]: UUID of player Demon is 6167a377-f470-334b-97e3-25519d58eb1d

I've opened user.db using DB Browser (SQLite) and changed Admin Shop UUID to right one. No idea why it had been changed and when. Seems everything is working fine now, no errors in the console and balance/tax start working. Thank you!

Phoenix616 commented 4 years ago

@DmitryRendov In offline mode it should generate the UUID based on the name and I would've assumed it generates the same one all the time. Not sure why that happens but I personally don't care about offline mode so unless someone else figures out what exactly is causing this I wont be wasting time supporting piracy.

It seems though as if @Danrique is experiencing a similar whether issue so it would still be helpful to know if the user logged in before or not.

DmitryRendov commented 4 years ago

@Phoenix616 fyi, UUID of Admin Shop user has again been changed to wrong one after the server restart... anyway, I'll double check if the issue continues in online mode as well. from my point of view it's new behavior and looks like a bug.

Danrique commented 4 years ago

I dont know how but the issue fixes itself with some restarts. And yes the account was online the whole time.

Lynks592 commented 4 years ago

@DmitryRendov I have done the same and UUID of Admin Shop user also has been changed. Have you figured this out?