kangarko / Boss

Premium custom monsters plugin with skill system, natural spawning and lots of sickest features!
https://www.mc-market.org/resources/21619/
77 stars 28 forks source link

1.20.1: Command spamming on boss spawn #1215

Closed willc5 closed 8 months ago

willc5 commented 10 months ago

When a boss spawns, for some reason the spawn command will spam a few times. There are no errors or anything

kangarko commented 10 months ago

What do you mean "spam a few times"?

willc5 commented 10 months ago

What do you mean "spam a few times"?

Screenshot 2023-10-13 032358 When the boss spawns, whatever command I have for spawning will run more than once

kangarko commented 10 months ago

Send me /boss debug here please, let me know which Boss.

willc5 commented 10 months ago

debug.zip When spawning at a certain location (arena) the issue does not occur. Not sure if I'm doing something wrong with the random spawning

kangarko commented 10 months ago

When it does occur? So I can try reproducing. Thanks.

willc5 commented 10 months ago

Only occurs when using the "Randomly Around Players" spawn rule. Have tried changing Run Chance and Delay in that rule, but it still happens regardless

kangarko commented 10 months ago

Sorry, wasnt able to find the problem. So I have added a debug key to test it.

On the next version please set Debug key in settings.yml to [spawning-command], let me know what it says when the commands are duped in the console.

Also can you test whether or not it happens when you use "broadcast" instead of "essentials:broadcast"?

Sorry for taking time, hope we can resolve this asap.

willc5 commented 10 months ago

Alright I will test this now

willc5 commented 10 months ago

Here is the console with essentials:broadcast Screenshot 2023-10-19 102838

Here is the console with normal broadcast Screenshot 2023-10-19 103206

willc5 commented 10 months ago

I have a radius set, so maybe it's just making too many attempts to spawn when it shouldn't?

When I set the world boss limit to 1 it doesn't do this btw

kangarko commented 10 months ago

The code says that the Boss is spawning 5-6 times as you can see. But the commands are only run when the Boss is spawned successfully, i.e. appears as entity in the world.

I would need more data, I am sorry. In the next version, please set Debug key to [spawning-command, spawning2] in settings.yml and report the big logs when the spawning is duplicated. It should also say the location of the spawned boss

willc5 commented 10 months ago

Screenshot 2023-10-20 124123

kangarko commented 10 months ago

As you can see, the locations are completely different. So that means the Boss is spawned 4x at totally different locations. Do you want me to cap the spawning to 1 boss maximum, per spawn rule tick?

willc5 commented 10 months ago

Ah ok, yeah if you could add some kind of limit that would be a great addition to the plugin, thank you for the help btw

kangarko commented 10 months ago

Sure, let me look into this in a few days.

kangarko commented 8 months ago

I am sorry, I completely forgot about this. Anyways, I don't think adding more limits will make the purpose. You can configure a global limit in settings.yml > Spawning > Limits under World_Limit as well as in the game inside Spawning menu in the Boss GUI:

Screenshot 2023-12-30 at 14 12 57