/// <summary> /// Adds a waypoint at the player's current position within the world, relative to the global spawn point. /// </summary> /// <param name="api">The core game API this method was called from.</param> /// <param name="icon">The icon to use for the waypoint.</param> /// <param name="colour">The colour of the waypoint.</param> /// <param name="title">The title to set.</param> /// <param name="pinned">if set to <c>true</c>, the waypoint will be pinned to the world map.</param> public static void AddWaypointAtCurrentPos( this ICoreClientAPI api, string icon, string colour, string title, bool pinned) { api.AddWaypointAtPos(api.World?.Player?.Entity?.Pos.AsBlockPos.RelativeToSpawn(api.World), icon, colour, title, pinned); }