Fixed loot chest double drops

This commit is contained in:
Indyuce 2022-10-14 01:20:44 +02:00
parent 5d03594a1c
commit 6afcd4da4c
3 changed files with 5 additions and 2 deletions

View File

@ -96,7 +96,6 @@ public class LootChestRegion {
LootChest lootChest = new LootChest(tier, this, location.getBlock());
LootBuilder builder = new LootBuilder(player, tier.rollCapacity(player));
tier.getDropTable().collect(builder);
LootChestSpawnEvent event = new LootChestSpawnEvent(player, lootChest, builder);
Bukkit.getPluginManager().callEvent(event);

View File

@ -71,6 +71,10 @@ public class DropTable extends PostLoadObject {
drops.add(item);
}
public Set<DropItem> getDrops() {
return drops;
}
public List<ItemStack> collect(LootBuilder builder) {
for (DropItem item : drops)

View File

@ -16,7 +16,7 @@
<description>Offer your players a brand new RPG experience!!</description>
<properties>
<revision>1.10.4-SNAPSHOT</revision>
<revision>1.10.3-SNAPSHOT</revision>
<downloadSources>false</downloadSources>
<downloadJavadocs>false</downloadJavadocs>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>