SPIGOT-2540: Add nullability annotations to entire Bukkit API
By: Darkyenus <darkyenus@gmail.com>
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package org.bukkit.advancement;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -14,6 +17,7 @@ public interface AdvancementProgress {
|
||||
*
|
||||
* @return the relevant advancement
|
||||
*/
|
||||
@NotNull
|
||||
Advancement getAdvancement();
|
||||
|
||||
/**
|
||||
@@ -30,7 +34,7 @@ public interface AdvancementProgress {
|
||||
* @return true if awarded, false if criteria does not exist or already
|
||||
* awarded.
|
||||
*/
|
||||
boolean awardCriteria(String criteria);
|
||||
boolean awardCriteria(@NotNull String criteria);
|
||||
|
||||
/**
|
||||
* Mark the specified criteria as uncompleted.
|
||||
@@ -38,7 +42,7 @@ public interface AdvancementProgress {
|
||||
* @param criteria the criteria to mark
|
||||
* @return true if removed, false if criteria does not exist or not awarded
|
||||
*/
|
||||
boolean revokeCriteria(String criteria);
|
||||
boolean revokeCriteria(@NotNull String criteria);
|
||||
|
||||
/**
|
||||
* Get the date the specified criteria was awarded.
|
||||
@@ -46,13 +50,15 @@ public interface AdvancementProgress {
|
||||
* @param criteria the criteria to check
|
||||
* @return date awarded or null if unawarded or criteria does not exist
|
||||
*/
|
||||
Date getDateAwarded(String criteria);
|
||||
@Nullable
|
||||
Date getDateAwarded(@NotNull String criteria);
|
||||
|
||||
/**
|
||||
* Get the criteria which have not been awarded.
|
||||
*
|
||||
* @return unmodifiable copy of criteria remaining
|
||||
*/
|
||||
@NotNull
|
||||
Collection<String> getRemainingCriteria();
|
||||
|
||||
/**
|
||||
@@ -60,5 +66,6 @@ public interface AdvancementProgress {
|
||||
*
|
||||
* @return unmodifiable copy of criteria awarded
|
||||
*/
|
||||
@NotNull
|
||||
Collection<String> getAwardedCriteria();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user