EvModder / DropHeads

A highly configurable head collecting plugin for Minecraft
GNU Lesser General Public License v3.0
36 stars 28 forks source link

Server Crashed From Plugin #100

Closed RAINRAINRAINRAINRAINRAINRAINRAINRAIN closed 1 year ago

RAINRAINRAINRAINRAINRAINRAINRAINRAIN commented 1 year ago

https://mclo.gs/TNAzYGV Yeah

EvModder commented 1 year ago

Looks like it's stuck requesting profile/skin lookups, which can be slow if the server has high ping to the Mojang API / Skin servers and the cache rate is bad.

An easy (although perhaps awkward) fix would be to set refresh-textures to false in the config.yml for DropHeads, which will skip the skin lookup check that occurs when a head item is dropped.

EvModder commented 1 year ago

I'm actually working on a more general solution to this problem, which will make requests to Mojang's skin servers asynchronously (in a different thread) and only update textures when the skin is immediately available in the cache. This won't be an option in the config until v3.7.14 is released though

RAINRAINRAINRAINRAINRAINRAINRAINRAIN commented 1 year ago

An easy (although perhaps awkward) fix would be to set refresh-textures to false in the config.yml for DropHeads, which will skip the skin lookup check that occurs when a head item is dropped.

The heads would still have the player skins though right ?

EvModder commented 1 year ago

Yep, they just wouldn't try to update the skin when they get dropped or placed

EvModder commented 1 year ago

Update: I've gone ahead and finished the async profile lookup I mentioned earlier, it can be enabled using this line in the config.yml

Currently only available in the v3.7.14 dev jar which I just posted. Once I've had time to test it more thoroughly and finish 1 other WIP feature for the v..14 release I'll post it on Bukkit as well

RAINRAINRAINRAINRAINRAINRAINRAINRAIN commented 1 year ago

Yep, they just wouldn't try to update the skin when they get dropped or placed So the skin of a player is being cached only once and even if they change skin it will drop the old head ?

Oh also here are another couple of bugs I noticed: You can't place heads on floor There's a double kill message on decapitation, one for regular kill and second for decapitation

It would also appear that there's no discordsrv hook so no decapitation messages go through discord, I personally would like to see that in future.

EvModder commented 1 year ago

Oh yeah I think I saw your message about those on Bukkit.

Placing heads on the floor -- It sounds like a config setting you might have accidentally enabled.

Double message on decapitation -- This was an issue with Paper/Purpur servers in 1.20+, it should be fixed now in v3.8.0, as long as you have this setting set to true and player beheads announcement set to 'GLOBAL'.

I'm curious about a DiscordSRV hook; I haven't looked at their API before (since I've only used EssentialsDiscord personally), but certainly sounds like something worth doing. So with DiscordSRV, there is currently absolutely nothing about the decapitation showing up in the linked channel right?

RAINRAINRAINRAINRAINRAINRAINRAINRAIN commented 1 year ago

Yeah, that's correct, nothing about decapitation shows in the discord chat. I also couldn't find any relevant settings in config that could affect floor placement, so yeah. If you have any clues, I would gladly test.

EvModder commented 1 year ago

Hmm, the floor placement issue could be caused by prevent-head-placement: true in the config.yml (that would be my first guess), I suppose it could also be caused by some other permission plugin, or anti-illegal-items plugin, if you have anything else like that.

Another way to check is to temporarily move all plugins to another folder (or move the server jar to a new folder) and run the server with just DropHeads with fresh config file (by moving/deleting the current one so it generates a new one) and see if it works there, and 1-by-1 re-add plugins until it breaks again, then if you let me know about it I can see if I can fix it from my end (or I can reach out to the plugin's developer and let them know about the compatibility problem)

RAINRAINRAINRAINRAINRAINRAINRAINRAIN commented 1 year ago

Prevent placement thing is set to false. I have tested it on a clear instance and I can indeed place heads on floor for some reason. I don't have time to add all plugins and test each time though.

EvModder commented 1 year ago

No worries, if you ever figure out which one is causing it just contact the plugin author (or myself).

I'm going to close this issue though because the original problem has been answered.