mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/LCE-Revelations.git
synced 2026-05-26 00:24:51 +00:00
Add hardcore-ban-ip property for IP banning on hardcore death
This commit introduces a new server property `hardcore-ban-ip` that controls whether players who die in hardcore mode are banned by their IP address. This setting should be set to `false` for playit.gg users! Key changes include: - Updated `banPlayerForHardcoreDeath` in `PlayerList.cpp` to check the `hardcoreBanIp` setting and handle IP bans accordingly. - Added `hardcore-ban-ip` to the default server properties in `ServerProperties.cpp`. - Declared the `hardcoreBanIp` boolean variable in `ServerProperties.h` to store the property value. These changes enhance the server's ability to enforce IP bans based on configuration settings.
This commit is contained in:
@@ -55,6 +55,7 @@ static const ServerPropertyDefault kServerPropertyDefaults[] =
|
||||
{ "gamertags", "true" },
|
||||
{ "generate-structures", "true" },
|
||||
{ "hardcore", "false" },
|
||||
{ "hardcore-ban-ip", "true" },
|
||||
{ "host-can-be-invisible", "true" },
|
||||
{ "host-can-change-hunger", "true" },
|
||||
{ "host-can-fly", "true" },
|
||||
@@ -863,6 +864,7 @@ ServerPropertiesConfig LoadServerPropertiesConfig()
|
||||
config.naturalRegeneration = ReadNormalizedBoolProperty(&merged, "natural-regeneration", true, &shouldWrite);
|
||||
config.doDaylightCycle = ReadNormalizedBoolProperty(&merged, "do-daylight-cycle", true, &shouldWrite);
|
||||
config.hardcore = ReadNormalizedBoolProperty(&merged, "hardcore", false, &shouldWrite);
|
||||
config.hardcoreBanIp = ReadNormalizedBoolProperty(&merged, "hardcore-ban-ip", true, &shouldWrite);
|
||||
|
||||
config.maxBuildHeight = ReadNormalizedIntProperty(&merged, "max-build-height", 256, 64, 256, &shouldWrite);
|
||||
config.motd = ReadNormalizedStringProperty(&merged, "motd", "A Minecraft Server", 255, &shouldWrite);
|
||||
|
||||
Reference in New Issue
Block a user