diff --git a/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch index a6dfcfcea..442e39895 100644 --- a/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/LootTable-API-Replenishable-Lootables-Feature.patch @@ -322,7 +322,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + return event.callEvent(); + } -+ public void processRefill(EntityHuman player) { ++ public void processRefill(@Nullable EntityHuman player) { + this.lastFill = System.currentTimeMillis(); + final PaperWorldConfig paperConfig = this.lootable.getNMSWorld().paperConfig; + if (paperConfig.autoReplenishLootables) { @@ -333,7 +333,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + if (paperConfig.changeLootTableSeedOnFill) { + this.lootable.setLootTableSeed(0); + } -+ this.setPlayerLootedState(player.getUniqueID(), true); ++ if (player != null) { // This means that numRefills can be incremented without a player being in the lootedPlayers list - Seems to be EntityMinecartChest specific ++ this.setPlayerLootedState(player.getUniqueID(), true); ++ } + } else { + this.lootable.clearLootTable(); + }