Skip to content

Commit 3082d6d

Browse files
committed
Annotate create methods with @NotNull for better inferring in Kotlin
1 parent 3b750e7 commit 3082d6d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

bukkit/src/main/java/revxrsal/commands/bukkit/BukkitCommandHandler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public interface BukkitCommandHandler extends CommandHandler {
3131
* @param plugin Plugin to create for
3232
* @return The newly created command handler
3333
*/
34-
static BukkitCommandHandler create(@NotNull Plugin plugin) {
34+
static @NotNull BukkitCommandHandler create(@NotNull Plugin plugin) {
3535
return new BukkitHandler(plugin);
3636
}
3737
}

bungee/src/main/java/revxrsal/commands/bungee/BungeeCommandHandler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public interface BungeeCommandHandler extends CommandHandler {
2323
* @param plugin Plugin to create for
2424
* @return The newly created command handler
2525
*/
26-
static BungeeCommandHandler create(@NotNull Plugin plugin) {
26+
static @NotNull BungeeCommandHandler create(@NotNull Plugin plugin) {
2727
return new BungeeHandler(plugin);
2828
}
2929

velocity/src/main/java/revxrsal/commands/velocity/VelocityCommandHandler.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public interface VelocityCommandHandler extends CommandHandler {
2727
* (namespace:command) will not work. Use {@link #create(Object, ProxyServer)}
2828
*/
2929
@Deprecated
30-
static VelocityCommandHandler create(@NotNull ProxyServer server) {
30+
static @NotNull VelocityCommandHandler create(@NotNull ProxyServer server) {
3131
return new VelocityHandler(null, server);
3232
}
3333

@@ -37,7 +37,7 @@ static VelocityCommandHandler create(@NotNull ProxyServer server) {
3737
* @param server Server proxy to register for
3838
* @return The newly created handler
3939
*/
40-
static VelocityCommandHandler create(Object plugin, @NotNull ProxyServer server) {
40+
static @NotNull VelocityCommandHandler create(Object plugin, @NotNull ProxyServer server) {
4141
return new VelocityHandler(plugin, server);
4242
}
4343

0 commit comments

Comments
 (0)