SPIGOT-2540: Add nullability annotations to entire Bukkit API

By: Darkyenus <darkyenus@gmail.com>
This commit is contained in:
Bukkit/Spigot
2019-03-13 17:42:57 +11:00
parent e069a80fd8
commit 416c865476
565 changed files with 5372 additions and 2008 deletions

View File

@@ -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());
}