SpongePowered / SpongeForge

A Forge mod that implements SpongeAPI
http://www.spongepowered.org/
MIT License
1.14k stars 306 forks source link

First Aid Mod Overriding Data Manipulators? #2998

Closed TheFlash787 closed 5 years ago

TheFlash787 commented 5 years ago

I am currently running

Issue Description RLCraft contains First Aid which introduces body-part damaging and requires you to use bandages and other items to regenerate your health (instead of naturally). However when using /heal from Nucleus, the hearts seem to visually replenish but as soon as damage is taken, the player's health goes back to what it was before (with the damage taken).

This was reported to @dualspiral but was recommended to report it to Sponge since the mod appears to be overriding the data manipulators. No errors are thrown when this takes place.

Thanks!

dualspiral commented 5 years ago

Thanks for doing this @TheFlash787.

For reference - Nucleus' heal command simply offers the value of Keys.MAX_HEALTH to the Keys.HEALTH key. I've not looked into FirstAid, but at a guess, I suspect that FirstAid is keeping its own health value and setting that, rather than using the standard fields to store it. I'm not sure if much could be done in this case, but I figured it was best to make it known here in case there was something we could do, hence why I suggested it be reported here.

All speculation though, of course - someone will need to go through it when time permits.

TheFlash787 commented 5 years ago

Ugh. This mod also overrides the PVP setting in server.properties it seems, too.

LXGaming commented 5 years ago

Ugh. This mod also overrides the PVP setting in server.properties it seems, too.

https://github.com/SpongePowered/SpongeCommon/commit/560c0c82ae42d63a1ecb304f409cccb0d8bd0a1a

Unfortunately, server.properties PVP setting cannot be honored due to how configuration and booleans work in them (cannot really specify "undefined"). The good news is you can still do a global setting via global.conf.

If you want PVP disabled try setting pvp-enabled to false in your sponge global.conf

TheFlash787 commented 5 years ago

I can confirm that disabling PVP via global.conf does indeed work. However I will close this issue because I have reported it on the mod's repository with extra information and issues that arose. Thank you!