Add nullable annotations to IGuiHandler (#3550)

This commit is contained in:
James Mitchell 2016-12-21 11:14:52 -08:00 committed by LexManos
parent 9010f1d7e7
commit 08a4f5f314

View file

@ -22,6 +22,8 @@ package net.minecraftforge.fml.common.network;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import javax.annotation.Nullable;
public interface IGuiHandler
{
/**
@ -35,7 +37,9 @@ public interface IGuiHandler
* @param z Z Position
* @return A GuiScreen/Container to be displayed to the user, null if none.
*/
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z);
@Nullable
Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z);
/**
* Returns a Container to be displayed to the user. On the client side, this
* needs to return a instance of GuiScreen On the server side, this needs to
@ -49,5 +53,6 @@ public interface IGuiHandler
* @param z Z Position
* @return A GuiScreen/Container to be displayed to the user, null if none.
*/
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z);
@Nullable
Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z);
}