[C] Added title length validation rule when creating custom inventories with a given title. Fixes BUKKIT-4616

The Issue:

If inventory titles exceeding 32 characters are sent to a vanilla Minecraft client, it will reject them and terminate the connection with the server.

Justification for this PR:

This additional validation rule will ensure that an appropriate error message is generated whenever an attempt to create an inventory with a title exceeding 32 characters is made, and also prevents this inventory from being created and the invalid packet being sent to any clients.

JIRA Ticket:

BUKKIT-4616 - https://bukkit.atlassian.net/browse/BUKKIT-4616