summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorParker Hawke <hawkeboyz2@hotmail.com>2018-09-03 19:16:29 -0400
committerParker Hawke <hawkeboyz2@hotmail.com>2018-09-03 19:16:29 -0400
commit3278a7271b40ccc81ebc6a226cde2be76b503cce (patch)
treedff5f3dd2815d97da7b0f48023cf3cc36f5c0afa /src/main
parent8ab814cd5c415258aa0ab7617051ee4ea9f4e7bd (diff)
downloadbukkit-3278a7271b40ccc81ebc6a226cde2be76b503cce.tar
bukkit-3278a7271b40ccc81ebc6a226cde2be76b503cce.tar.gz
bukkit-3278a7271b40ccc81ebc6a226cde2be76b503cce.tar.lz
bukkit-3278a7271b40ccc81ebc6a226cde2be76b503cce.tar.xz
bukkit-3278a7271b40ccc81ebc6a226cde2be76b503cce.zip
Add a #getLootTable() method to LootTables enum
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/loot/LootTables.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/loot/LootTables.java b/src/main/java/org/bukkit/loot/LootTables.java
index 613a198e..6e5e4d8e 100644
--- a/src/main/java/org/bukkit/loot/LootTables.java
+++ b/src/main/java/org/bukkit/loot/LootTables.java
@@ -1,5 +1,6 @@
package org.bukkit.loot;
+import org.bukkit.Bukkit;
import org.bukkit.Keyed;
import org.bukkit.NamespacedKey;
@@ -125,4 +126,14 @@ public enum LootTables implements Keyed {
public NamespacedKey getKey() {
return NamespacedKey.minecraft(location);
}
+
+ /**
+ * Get the {@link LootTable} corresponding to this constant. This is
+ * equivalent to calling {@code Bukkit.getLootTable(this.getKey());}.
+ *
+ * @return the associated LootTable
+ */
+ public LootTable getLootTable() {
+ return Bukkit.getLootTable(getKey());
+ }
}