Open qualityrice opened 5 months ago
Could you show a more complete example with the modeset changing and the debug
enabled in the config.yml? I am not able to replicate this
Sure. Do you want a recording or the server's latest.log file?
Sure. Do you want a recording or the server's latest.log file?
If you can capture the actual debug output the player sees that would be ideal.
Here's what comes up after I switch mode and also when I'm in combat. I switch between clicking fast like you do in pre 1.9 combat, and clicking slowly like you do in 1.9+. The full debug output is in the log file.
Sorry about the video quality. Github's 10MB file limit is the culprit.
Yes, that seems like the attack speed is not being updated after changing modeset even when it should be.
I am unable to reproduce this issue at all. Can you please try test version 217? I have added some extra debugging information both in the console and for the player changing modeset
Sure. It's a really weird bug because it only happens on one of my servers where I cannot disable the cooldown no matter what I do. The cooldown is always active, before I try to switch the mode and also after. The command doesn't seem to do anything. I am unable to replicate this bug anywhere else. On my other server, the plugin seems to work as intended.
I can't manage to get the video I recorded to less than 10MB so I hope the log is enough. I hit some mobs sometimes fast and sometimes slow, then about halfway through the log I "switch the mode" to old and hit some more mobs. Again I don't think switching the mode does anything for me but maybe it will help with debugging. If there's anything else I can do, let me know.
Sure. It's a really weird bug because it only happens on one of my servers where I cannot disable the cooldown no matter what I do. The cooldown is always active, before I try to switch the mode and also after. The command doesn't seem to do anything. I am unable to replicate this bug anywhere else. On my other server, the plugin seems to work as intended.
I can't manage to get the video I recorded to less than 10MB so I hope the log is enough. I hit some mobs sometimes fast and sometimes slow, then about halfway through the log I "switch the mode" to old and hit some more mobs. Again I don't think switching the mode does anything for me but maybe it will help with debugging. If there's anything else I can do, let me know.
From the logs, it looks like OCM actually is setting the correct attack speed, but somehow it is not being respected.
There was an error in the last log I sent. Something with "Error attaching packet listener!", I don't know if that has something to do with it?
I also tested with Spigot 1.20.4 instead of Paper 1.20.4 but the problem remains.
However I did do some testing on my own just now. The bug does go away if I go to world -> playerdata -> and remove my own uuid. Once I restart the server and generate a new playerdata file, the cooldown is gone and the plugin seems to work as intended. However this is only from my own testing and I'm not 100% sure if this would fix the problem for other players too, and even then I don't think it's a good solution since it can happen again. So even if the issue lies in the playerdata, it's still a bug in the plugin right?
I attached the playerdata file that seems to cause issues. Just replace "UUID" with your own UUID and then add it to a server with Spigot or Paper 1.20.4 and you should see the same bug as me.
(PS: I don't think it's the item I'm holding that is the problem either. I did try to use other items from the creative menu but the cooldown still remains)
The packet listener error is just reflection failing on a very specific version of the server, and only affects the disable-player-collisions
module. If you keep seeing it, please open a new issue for that.
If deleting the player data fixes the issue, I suspect you had corrupted/incompatible player data. Did you use any of the test versions while the modeset feature was still being worked on? Because the format did change a bit, and one of the attempts involved storing data straight into the player metadata, which would end up in the playerdata file like the one you uploaded.
Hmm that's strange. I only used the stable/release builds and never any test versions. But all UUIDs on my server have the same problem. I guess I could just delete them and have new ones be created, but I would just have to hope that the same thing doesn't happen again.
Is there any way to see if the UUID contains something that makes it corrupted? I looked through it using a NBT editor where it showed me all its values, but I couldn't find anything.
Do you have a copy of the players.bson
file in the plugins/OldCombatMechanics
folder? That might've gotten corrupted at some point
Information
Server Version: Paper 1.20.4
OldCombatMechanics version: 2.0.1
Server Log File: There is nothing in the console except for the usual "Enabling OldCombatMechanics v2.0.1" and disabling it etc. If I should still add it here for some reason, let me know.
config.yml
Problem Description
The main problem is that the cooldown is not disabled when it should be. My server has the 1.9 cooldown no matter what I do. Some things in the plugin do work though like being able to craft enchanted golden apples, which I enabled in the config, that works fine. But disabling the cooldown does not work, and neither does disabling the offhand, among possibly other things that are hard to find out for sure.
To Reproduce
Steps to reproduce the behavior: 1. (Optional) delete the [new] modeset in the config 2. (Optional) use the command /ocm mode old (player) 3. Take out a sword or axe etc and left click anywhere. The 1.9+ cooldown is there like always. ### Expected BehaviourThe 1.9+ cooldown should not be active and the server should use the 1.8 combat system.
Actual Behaviour
The 1.9+ cooldown is active and the server is not using the 1.8 combat system.
https://github.com/kernitus/BukkitOldCombatMechanics/assets/65903443/613be6ab-45f6-4ca5-82e0-9d30b69a73c7
In the video here, you can see that the modeset is set to "old", the attack speed is 36.8 but the 1.9+ cooldown remains when I left click.