only close the screen when the player was actually hurt
@@ -109,7 +109,7 @@ public interface IPasswordProtected extends ICodebreakable {
startCooldown();
if (moduleInv.isModuleEnabled(ModuleType.HARMING)) {
- player.hurt(CustomDamageSources.INCORRECT_PASSCODE, ConfigHandler.SERVER.incorrectPasscodeDamage.get());
+ if (player.hurt(CustomDamageSources.INCORRECT_PASSCODE, ConfigHandler.SERVER.incorrectPasscodeDamage.get()))
player.closeContainer();
}
