mcMMO-Dev / mcMMO

The RPG Lover's Mod!
https://mcmmo.org
GNU General Public License v3.0
1.01k stars 863 forks source link

Plugin Compatibility Request: Players become immortal #4752

Open austv opened 2 years ago

austv commented 2 years ago

I've seen this issue reported before on Discord and github. https://github.com/mcMMO-Dev/mcMMO/issues/4458#issuecomment-817878926

I'm experiencing the same bug and I try to give as much detail as I can.

After a combat, players became immortals. I can hit them but they don't take any damage. The only way to kill them is using /kill. Even after /kill him, he continue to be immortal and the only way to fix it is reloging. (I even testing /attribute {player} minecraft:generic.max_health base set 20 but doesn't work).

In first place, I thought the problem was coming from a AdvancedEnchantments plugin. But, I come to my test server and use only these plugins, and the problem persists: image

I'm using paper 1.18.1 - mcMMO version 2.1.209

What usually happens: in a combat using mcMMO, the players become immortal after a while, can't find any pattern. They usually use axes and swords, sometimes unarmed skills and of course, the passive of acrobatics; they also use vanilla potions (weakness, strenght and speed). In a 1v1, the immortality takes a long time to come, sometimes it don't. In my main server, with 30/40 players in a combat event, a lot of players got immortal. Because of this, the pvp took longer and all the players (who can survive long enought) became too.

I have to use the OldCombatMechanics to simulate the 1.8 pvp. But, in regions (WorldGuard) without mcMMO, the problem doesn't exist. So, I can only do non mcMMO combat events.

BetterPvP is a mod that help us too see who is immortal and who don't. A normal health bar players is show by this way: image

And a immortal player, the health bar dissapear: image

(Those prints was taken from the same event)

I'll leave a video of what immortality is (I used the test server, with plugins I've attached). Please note that I am out of the healthy bar and remember, we don't use any pvp manager or region plugin: https://www.youtube.com/watch?v=FqcAdAQ7SPo&feature=youtu.be

I haven't seen any immortality becoming from combat without potion effects. How the weakness affects rupture damage and other abilities, maybe is it related? I can also test potion-free combat to see if we become immortal too (remember we used all vanilla potions and didn't change anything in OldCombatMechanics).

I think is not related, but gonna leave my OldCombatMechanics config here: https://pastebin.com/raw/RckBWLjK

austv commented 2 years ago

Found what is causing this bug. After several tests with several possibilities, we found the problem is coming from mcMMO + weakness effect.

We noticed that weakness affects the damage of mcmmo skills. So the final test was:

  1. 1v1, both with weakness = both became immortal.
  2. 1v1, both without weakness = no problem detected.
  3. 1v1, one player with weakness = the another player became immortal.

image

As far I can see, don't matter the source of weakness, may be from potion, /effect command or even external plugins.

TDMidkwhatisxd commented 2 years ago

Its weird that this issue is ignored. Uninstalled until its fixed. I didnt really noticed the issue, but i heard rumors with invincible players -.-

nossr50 commented 2 years ago

This is a known compatibility issue, on its own mcMMO does not do anything with the weakness potion or modifying player max health. Please eliminate plugins one by one until you find which one is causing the compatibility issue, then reply to this thread with that info. I would personally suspect any mod that is touching player health values or combat interactions, so start with those.

Also are you seeing any errors in your latest.log when the immortality happens? If I had to guess some plugin is seeing negative damage values and assigning that to player health, we don't touch player max health values in mcMMO.

We have a method in mcMMO to check for weakness damage but it's not even used right now image

austv commented 2 years ago

Hey @nossr50 , happy birthday! Thanks for keeping mcmmo alive.

image I kept these two plugins. Didn't got immortality only with mcMMO, so the incompatibility is coming from OldCombatMechanics.

That plugin has a weakness config, and I tried to change it.

  weakness:
    modifier: -0.5
    multiplier: false

I tried to change to modifier to zero, but still getting the immortality.

That's the plugin page: https://www.spigotmc.org/resources/oldcombatmechanics-disable-1-9-hit-cooldown.19510/

nossr50 commented 2 years ago

@austv Thanks for the info, I just looked over the code for that plugin and I'm scratching my head... it's pretty complex and I don't see any obvious reason this would cause players to become immortal, I think you may need to reach out to that author and maybe link him to this issue page and see what he thinks, or perhaps report the bug on his page. If he can talk to me maybe we can figure it out together?

austv commented 2 years ago

Well, I can't reach the author, looks like he hasn't been very active lately. I believe this is the most used plugin by people who want to simulate 1.8 combat in newer version. But, the plugin still don't have 1.18 support, maybe is that it? I remember when I have my server in 1.16.5 with the same plugins and never experienced that bug.

What I know is, a player with weakness effect, he deals less armor damage (with axe abilitie) and less rupture damage. Will try to send him the link. What else can we do?

nossr50 commented 2 years ago

@austv I added some debug info to /mmodebug in the newest dev build that I just pushed out, if you could get your players to recreate this bug while in /mmodebug mode and take screenshots of the output and post them here, that would be appreciated.

L4BORG commented 2 years ago

I see the same issue... the only thing we did to revert mechanics to 1.8 was

    public void applyModifiers(Player player) {
        setPlayerAttribute(player, Attribute.GENERIC_ATTACK_DAMAGE, attackDamage);
        setPlayerAttribute(player, Attribute.GENERIC_KNOCKBACK_RESISTANCE, knockbackResistance);
        //setPlayerAttribute(player, Attribute.GENERIC_ARMOR, armor);
        setPlayerAttribute(player, Attribute.GENERIC_ATTACK_SPEED, attackSpeed);
    }

nothing else... so that shouldn't really be an issue?

Now I'm thinking what else was updated in this time... NoCheatPlus, WorldGuard, but those shouldn't be an issue?