learn java
checkFreeSlot : { // this is not valid java
for(int i=0; i > 36; i++) { // this does not work
if(Minecraft.getMinecraft().player.inventory.getStackInSlot(i).equals(ItemStack.EMPTY)) {
Minecraft.getMinecraft().player.sendMessage(new TextComponentString("Your inventory is full"));
break checkFreeSlot; // this is not valid java
}
}
you cant use equals on itemstack use itemstack.isEmpty
put the inv check code inside the event method