From 6afcd4da4c831f3972457a19317aa6562cd9eae4 Mon Sep 17 00:00:00 2001 From: Indyuce Date: Fri, 14 Oct 2022 01:20:44 +0200 Subject: [PATCH] Fixed loot chest double drops --- .../java/net/Indyuce/mmocore/loot/chest/LootChestRegion.java | 1 - .../java/net/Indyuce/mmocore/loot/droptable/DropTable.java | 4 ++++ pom.xml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/loot/chest/LootChestRegion.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/loot/chest/LootChestRegion.java index 5d980d95..bc14ef6a 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/loot/chest/LootChestRegion.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/loot/chest/LootChestRegion.java @@ -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); diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/loot/droptable/DropTable.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/loot/droptable/DropTable.java index 4e37479d..8ebe771b 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/loot/droptable/DropTable.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/loot/droptable/DropTable.java @@ -71,6 +71,10 @@ public class DropTable extends PostLoadObject { drops.add(item); } + public Set getDrops() { + return drops; + } + public List collect(LootBuilder builder) { for (DropItem item : drops) diff --git a/pom.xml b/pom.xml index 21a2caec..0c1cd389 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ Offer your players a brand new RPG experience!! - 1.10.4-SNAPSHOT + 1.10.3-SNAPSHOT false false UTF-8