SPIGOT-2540: Add nullability annotations to entire Bukkit API
By: Darkyenus <darkyenus@gmail.com>
This commit is contained in:
@@ -3,6 +3,7 @@ package org.bukkit.loot;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Keyed;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* This enum holds a list of all known {@link LootTable}s offered by Mojang.
|
||||
@@ -118,10 +119,11 @@ public enum LootTables implements Keyed {
|
||||
|
||||
private final String location;
|
||||
|
||||
private LootTables(String location) {
|
||||
private LootTables(@NotNull String location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public NamespacedKey getKey() {
|
||||
return NamespacedKey.minecraft(location);
|
||||
@@ -133,6 +135,7 @@ public enum LootTables implements Keyed {
|
||||
*
|
||||
* @return the associated LootTable
|
||||
*/
|
||||
@NotNull
|
||||
public LootTable getLootTable() {
|
||||
return Bukkit.getLootTable(getKey());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user