Boosters icon indicating copy to clipboard operation
Boosters copied to clipboard

Boosters stop working after a player joins the server

Open Westloch opened this issue 3 years ago • 5 comments

Plugin Version: 3.18.0 Server Version: Purpur 1.18.2

Extentions forlder: EMPTY Boosters.yml: https://pastebin.com/8i782dBz Config.yml: https://pastebin.com/xeC9fUG3 Lang.yml: https://pastebin.com/94dUc1kg

Console startup: https://pastebin.com/H78YsTpE Console errors: NONE

Video of bug: https://youtu.be/NLLNfc7NK1Q

Description: Boosters stop working after a new player joins the server.

in the video we are using an xp bottle that gives you 1000 xp just so its easier to see the xp boost multiplier.

You can see how i get exactly 1000 xp before a booster is activated, then i activate a 10x xp booster and get 10000 xp as expected. I did this a few times and it worked as intended.

Then we had another person join the server, and immediately the booster stop working. We tried to activate another booster after the person joined and the multiplier no longer worked.

It seems that boosters work, but if someone joins the server after a booster has been activated (even if the booster has ended), they completely stop working. Basically, you can only use 1 booster per server restart.

Reloading doesnt help, the server needs to be restarted to get another booster to work (edited)

Westloch avatar Apr 24 '22 19:04 Westloch

I tested on a server with no plugins other than the ones required to make boosters work (Boosters v4.0.1,eco-6.35.1-all, PlaceholderAPI-2.11.1, ProtocolLib), and the behavior is still the same.

I have not tried other booster types only "xp_multiplier", so i can not confirm if theres an issue with other booster types. Afaik only the xp_multiplier is the ones with issues.

Westloch avatar Apr 29 '22 23:04 Westloch

Weird... thanks for the report i'll figure this out

WillFP avatar May 06 '22 07:05 WillFP

I think there's a good chance that the issue was actually somewhere else entirely - xp_multiplier is designed to never work with xp bottles, so the fact that it did is a bug in and of itself; i have absolutely no idea why another player being online fixed that, but the issue seemed to be in eco instead. If you run paper on your server (which you should be), then grabbing the newest version of eco should fix it, as i've implemented separate logic for NaturalExpGainEvent if you're running paper

WillFP avatar May 06 '22 08:05 WillFP

Thanks so much for looking into it!

Now that "NaturalExpGainEvent" was added, what does that mean exactly, what changed if anything?

Also since the xp_multiplier shouldnt work with the xp bottles I'm assuming it should work with everything else: breaking ores, smelting, villager trading, killing mobs, etc or are there other things it will not work with?

Westloch avatar May 06 '22 14:05 Westloch

also, i tested a bit with the new version of eco, and it seems that the exp bottles now work perfectly fine

Westloch avatar May 06 '22 16:05 Westloch