Fix more incorrect array nullability annotations (#11836)
This commit is contained in:
@@ -319,7 +319,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String @NotNull [] args) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, @NotNull String[] args) {
|
||||
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String alias, @NotNull String @NotNull [] args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -229,5 +229,5 @@ public interface Messenger {
|
||||
* @param channel Channel that the message was sent by.
|
||||
* @param message Raw payload of the message.
|
||||
*/
|
||||
public void dispatchIncomingMessage(@NotNull Player source, @NotNull String channel, @NotNull byte[] message);
|
||||
public void dispatchIncomingMessage(@NotNull Player source, @NotNull String channel, byte @NotNull [] message);
|
||||
}
|
||||
|
||||
@@ -17,5 +17,5 @@ public interface PluginMessageListener {
|
||||
* @param player Source of the message.
|
||||
* @param message The raw message that was sent.
|
||||
*/
|
||||
public void onPluginMessageReceived(@NotNull String channel, @NotNull Player player, @NotNull byte[] message);
|
||||
public void onPluginMessageReceived(@NotNull String channel, @NotNull Player player, byte @NotNull [] message);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public interface PluginMessageRecipient {
|
||||
* @throws ChannelNotRegisteredException Thrown if the channel is not
|
||||
* registered for this plugin.
|
||||
*/
|
||||
public void sendPluginMessage(@NotNull Plugin source, @NotNull String channel, @NotNull byte[] message);
|
||||
public void sendPluginMessage(@NotNull Plugin source, @NotNull String channel, byte @NotNull [] message);
|
||||
|
||||
/**
|
||||
* Gets a set containing all the Plugin Channels that this client is
|
||||
|
||||
@@ -439,7 +439,7 @@ public class StandardMessenger implements Messenger {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatchIncomingMessage(@NotNull Player source, @NotNull String channel, @NotNull byte[] message) {
|
||||
public void dispatchIncomingMessage(@NotNull Player source, @NotNull String channel, byte @NotNull [] message) {
|
||||
if (source == null) {
|
||||
throw new IllegalArgumentException("Player source cannot be null");
|
||||
}
|
||||
@@ -534,7 +534,7 @@ public class StandardMessenger implements Messenger {
|
||||
* @throws ChannelNotRegisteredException Thrown if the channel is not
|
||||
* registered for this plugin.
|
||||
*/
|
||||
public static void validatePluginMessage(@NotNull Messenger messenger, @NotNull Plugin source, @NotNull String channel, @NotNull byte[] message) {
|
||||
public static void validatePluginMessage(@NotNull Messenger messenger, @NotNull Plugin source, @NotNull String channel, byte @NotNull [] message) {
|
||||
if (messenger == null) {
|
||||
throw new IllegalArgumentException("Messenger cannot be null");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user