mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 19:15:32 +00:00
Cleanup some null checks and remove deprecated methods in Item and Block (#3429)
This commit is contained in:
1 parent
2823447b6e
commit
2bd8b95a3b
31 files changed
+175
-174
No files matched your search
@@ -27,6 +27,7 @@ import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -80,7 +81,8 @@ public abstract class CommandTreeBase extends CommandBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getTabCompletionOptions(MinecraftServer server, ICommandSender sender, String[] args, @Nullable BlockPos pos)
|
||||
@Nonnull
|
||||
public List<String> getTabCompletionOptions(@Nonnull MinecraftServer server, @Nonnull ICommandSender sender, @Nonnull String[] args, @Nullable BlockPos pos)
|
||||
{
|
||||
if(args.length == 1)
|
||||
{
|
||||
@@ -109,7 +111,7 @@ public abstract class CommandTreeBase extends CommandBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUsernameIndex(String[] args, int index)
|
||||
public boolean isUsernameIndex(@Nonnull String[] args, int index)
|
||||
{
|
||||
if(index > 0 && args.length > 1)
|
||||
{
|
||||
@@ -124,7 +126,7 @@ public abstract class CommandTreeBase extends CommandBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException
|
||||
public void execute(@Nonnull MinecraftServer server, @Nonnull ICommandSender sender, @Nonnull String[] args) throws CommandException
|
||||
{
|
||||
if(args.length < 1)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user