Added nullability annotations to both PlaceholderReplacers' #onReplace(...) method

This commit is contained in:
Florian CUNY 2019-04-07 10:02:10 +02:00
parent b40f07f763
commit e8ec7b24b4
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,7 @@
package world.bentobox.bentobox.api.placeholders;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import world.bentobox.bentobox.api.addons.GameModeAddon;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.objects.Island;
@ -12,5 +14,6 @@ import world.bentobox.bentobox.database.objects.Island;
@FunctionalInterface
public interface GameModePlaceholderReplacer {
String onReplace(GameModeAddon addon, User user, Island island);
@NonNull
String onReplace(@NonNull GameModeAddon addon, @Nullable User user, @Nullable Island island);
}

View File

@ -1,9 +1,12 @@
package world.bentobox.bentobox.api.placeholders;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import world.bentobox.bentobox.api.user.User;
@FunctionalInterface
public interface PlaceholderReplacer {
String onReplace(User user);
@NonNull
String onReplace(@Nullable User user);
}