mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
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.
This commit is contained in:
parent
49502449bb
commit
f5719c0b4a
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
+ }
|
||||
|
|
Loading…
Reference in a new issue