EssentialsX

EssentialsX

2M Downloads

Command cost gets withdrawn twice

BoJockel opened this issue ยท 15 comments

commented

Full output of /ess version:

[14:51:45 INFO]: Server Version: 1.16.1-R0.1-SNAPSHOT git-Paper-99 (MC: 1.16.1)
[14:51:45 INFO]: EssentialsX Version: 2.18.0.0
[14:51:45 INFO]: LuckPerms Version: 5.1.26
[14:51:45 INFO]: Vault Version: 1.7.2-b107
[14:51:45 INFO]: EssentialsXChat Version: 2.18.0.0
[14:51:45 INFO]: EssentialsXAntiBuild Version: 2.18.0.0
[14:51:45 INFO]: EssentialsXProtect Version: 2.18.0.0

Server log: The log shows no payment.

EssentialsX config: https://gist.github.com/BoJockel/26b9b6639efdc6e07ea6896a29e1b08c

Details

Description
If i configure the command cost in the Economy section, in game in chat it shows the right amount. But it cost twice the price as the config.
EssentialsX economy is used.

Steps to reproduce
Just enter the value in config and try it on the server.
(Line 704 & 705)

Expected behavior
Its expected that the right amount of currency get subtract.

Screenshots
Not necessary.

commented

Does it cost twice the amount, or is it rounding up to the nearest whole number? ie; .5 becomes 1, and 1.5 becomes 2.

commented

i tested it now again.
it doubles, if i put 1 in config it withdraw 2 of the currency.
i can provide pictures if its helpful.

commented

Hm... Would you be able to please provide a server log? (as is request in the original bug report template)

commented

the server log dont show as far as i know the payment but i can do it.

commented

https://gist.github.com/BoJockel/67a2706fd2f6521d37b6034f5c2c8819
here you go, in the last section i tried it again with the commands.

commented

Look at line number 2002. It means your config.yml broke and it had to put that file aside and generate you a new one (with all default values). Copy/paste the entire config into this website and fix any errors it gives you then try again.

commented

If that website isn't helping you, do another paste of whichever is the config file that keeps breaking.

commented

that was just a config error from me, i fixed that. it has nothing to do with this problem.
i put 2 ** in the first line because my teamspeak mutes with this key.

this is not the problem!

commented

the whole config is stock, just this 2 command cost features are enabled

commented

Hmm. I'm not sure what else could be the issue. Best at this point to wait for someone more qualified than myself to help address your issue.

commented

Can you provide a log, with /ess verbose turned on, so we can see what costs are being calculated by Essentials?

commented

https://gist.github.com/BoJockel/c0f32ba6d83ee771d207f357ae608bb8

i just see that its calculating 2 times but not how.

commented

I was able to reproduce this by simply adding a command cost of 1 for home to the config.

/ess version output:

[22:41:33 INFO]: Server version: 1.16.1-R0.1-SNAPSHOT git-Paper-128 (MC: 1.16.1)
[22:41:33 INFO]: EssentialsX version: 2.18.0.8
[22:41:33 INFO]: LuckPerms version: 5.1.84
[22:41:33 INFO]: Vault version: 1.7.3-b131

Config file:
https://gist.github.com/triagonal/97104cef16b3edecb299005bd4b76231

Relevant log with debug mode enabled:
https://gist.github.com/triagonal/8e786bb478f3b862bc11fa9044a2f01f

Chat output after having run /home a single time:
image

commented

I'm having the same issue, it seems to deduct money when the command is ran initially, and a second time upon success. With a teleport delay, the second deduction occurs after the delay, and if the player moves, a second deduction does not occur. This behaviour from /home also occurs with /warp and /spawn (from essentials spawn), but interestingly not /back. The intended behaviour should ignore charging the player when running the command and only charge upon teleport success.

commented

This has been fixed in EssentialsX versions 2.18.0.22 and above. Download the latest version here.