@Nonnull
    public static Optional<MetadataMap> get(@Nonnull Object obj) {
        Objects.requireNonNull(obj, "obj");
        if (obj instanceof Player) {
            return getForPlayer(((Player) obj));
        } else if (obj instanceof UUID) {
            return getForPlayer(((UUID) obj));
        } else if (obj instanceof Entity) {
            return getForEntity(((Entity) obj));
        } else if (obj instanceof Block) {
            return getForBlock(((Block) obj));
        } else if (obj instanceof World) {
            return getForWorld(((World) obj));
        } else {
            throw new IllegalArgumentException("Unknown object type: " + obj.getClass());
        }
    }
Gets a {@link MetadataMap} for the given object, if one already exists and has
been cached in this registry.

A map will only be returned if the object is an instance of
{@link Player}, {@link UUID}, {@link Entity}, {@link Block} or {@link World}.

@param obj the object
@return a metadata map
helper/src/main/java/me/lucko/helper/metadata/Metadata.java