mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
Add a #getLootTable() method to LootTables enum
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
parent
3208cbdd7f
commit
7b32fe4d18
1 changed files with 11 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
package org.bukkit.loot;
|
package org.bukkit.loot;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Keyed;
|
import org.bukkit.Keyed;
|
||||||
import org.bukkit.NamespacedKey;
|
import org.bukkit.NamespacedKey;
|
||||||
|
|
||||||
|
@ -125,4 +126,14 @@ public enum LootTables implements Keyed {
|
||||||
public NamespacedKey getKey() {
|
public NamespacedKey getKey() {
|
||||||
return NamespacedKey.minecraft(location);
|
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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue