forked from Upstream/mmocore
Fixed loot chest double drops
This commit is contained in:
parent
5d03594a1c
commit
6afcd4da4c
@ -96,7 +96,6 @@ public class LootChestRegion {
|
|||||||
|
|
||||||
LootChest lootChest = new LootChest(tier, this, location.getBlock());
|
LootChest lootChest = new LootChest(tier, this, location.getBlock());
|
||||||
LootBuilder builder = new LootBuilder(player, tier.rollCapacity(player));
|
LootBuilder builder = new LootBuilder(player, tier.rollCapacity(player));
|
||||||
tier.getDropTable().collect(builder);
|
|
||||||
|
|
||||||
LootChestSpawnEvent event = new LootChestSpawnEvent(player, lootChest, builder);
|
LootChestSpawnEvent event = new LootChestSpawnEvent(player, lootChest, builder);
|
||||||
Bukkit.getPluginManager().callEvent(event);
|
Bukkit.getPluginManager().callEvent(event);
|
||||||
|
@ -71,6 +71,10 @@ public class DropTable extends PostLoadObject {
|
|||||||
drops.add(item);
|
drops.add(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<DropItem> getDrops() {
|
||||||
|
return drops;
|
||||||
|
}
|
||||||
|
|
||||||
public List<ItemStack> collect(LootBuilder builder) {
|
public List<ItemStack> collect(LootBuilder builder) {
|
||||||
|
|
||||||
for (DropItem item : drops)
|
for (DropItem item : drops)
|
||||||
|
2
pom.xml
2
pom.xml
@ -16,7 +16,7 @@
|
|||||||
<description>Offer your players a brand new RPG experience!!</description>
|
<description>Offer your players a brand new RPG experience!!</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>1.10.4-SNAPSHOT</revision>
|
<revision>1.10.3-SNAPSHOT</revision>
|
||||||
<downloadSources>false</downloadSources>
|
<downloadSources>false</downloadSources>
|
||||||
<downloadJavadocs>false</downloadJavadocs>
|
<downloadJavadocs>false</downloadJavadocs>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
Loading…
Reference in New Issue
Block a user