Cleanup some null checks and remove deprecated methods in Item and Block (#3429)

This commit is contained in:
mezz authored and LexManos committed 2016-11-22 15:20:05 -08:00
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)
{