SPIGOT-1936: LootTable API

By: Senmori <thesenmori@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2018-08-12 18:39:51 +10:00
parent 277f0db6c9
commit 39c4334d76
15 changed files with 434 additions and 21 deletions

View File

@@ -0,0 +1,22 @@
package org.bukkit;
import org.bukkit.loot.LootTable;
import org.bukkit.loot.LootTables;
import org.bukkit.support.AbstractTestingBase;
import org.junit.Assert;
import org.junit.Test;
public class LootTablesTest extends AbstractTestingBase {
@Test
public void testLootTablesEnumExists() {
LootTables[] tables = LootTables.values();
for (LootTables table : tables) {
LootTable lootTable = Bukkit.getLootTable(table.getKey());
Assert.assertNotNull("Unknown LootTable " + table.getKey(), lootTable);
Assert.assertEquals(lootTable.getKey(), table.getKey());
}
}
}