SPIGOT-2540: Add nullability annotations to entire Bukkit API
By: Darkyenus <darkyenus@gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@ package org.bukkit.conversations;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* PluginNameConversationPrefix is a {@link ConversationPrefix} implementation
|
||||
@@ -15,11 +16,11 @@ public class PluginNameConversationPrefix implements ConversationPrefix {
|
||||
|
||||
private String cachedPrefix;
|
||||
|
||||
public PluginNameConversationPrefix(Plugin plugin) {
|
||||
public PluginNameConversationPrefix(@NotNull Plugin plugin) {
|
||||
this(plugin, " > ", ChatColor.LIGHT_PURPLE);
|
||||
}
|
||||
|
||||
public PluginNameConversationPrefix(Plugin plugin, String separator, ChatColor prefixColor) {
|
||||
public PluginNameConversationPrefix(@NotNull Plugin plugin, @NotNull String separator, @NotNull ChatColor prefixColor) {
|
||||
this.separator = separator;
|
||||
this.prefixColor = prefixColor;
|
||||
this.plugin = plugin;
|
||||
@@ -33,7 +34,8 @@ public class PluginNameConversationPrefix implements ConversationPrefix {
|
||||
* @param context Context information about the conversation.
|
||||
* @return An empty string.
|
||||
*/
|
||||
public String getPrefix(ConversationContext context) {
|
||||
@NotNull
|
||||
public String getPrefix(@NotNull ConversationContext context) {
|
||||
return cachedPrefix;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user