From f5719c0b4a6586144da57107fe8e417ed3565a48 Mon Sep 17 00:00:00 2001 From: Bjarne Koll Date: Wed, 16 Aug 2023 06:08:00 +0200 Subject: [PATCH] Don't let player loot if reloot time is disabled (#9615) If the reloot time is disabled while reloot is restricted, the player should not be able to reloot. The previous logic was incorrect and allowed players to reloot explicitly when the reloot time was disabled. --- .../server/LootTable-API-Replenishable-Lootables-Feature.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch b/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch index 8e74459dcf..6c493e61d1 100644 --- a/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch +++ b/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch @@ -419,7 +419,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + if (!worldConfiguration.lootables.restrictPlayerReloot || lastLooted == null) return true; + + final DurationOrDisabled restrictPlayerRelootTime = worldConfiguration.lootables.restrictPlayerRelootTime; -+ if (restrictPlayerRelootTime.value().isEmpty()) return true; ++ if (restrictPlayerRelootTime.value().isEmpty()) return false; + + return TimeUnit.SECONDS.toMillis(restrictPlayerRelootTime.value().get().seconds()) + lastLooted < System.currentTimeMillis(); + }