NullReferenceException when warping sleepers

Hi,
i tried to warp sleepers. Only 1 sleeper is teleported. Right after that, the player.SendFullSnapShot() (from ForcePlayerPos()) throws an exception.

Failed to call hook 'cmdWarp' on plugin 'WarpSystem v1.9.14' (NullReferenceException: Object reference not set to an instance of an object)
  at BasePlayer.SendFullSnapshot () [0x0000c] in <2e0a38bcd133484ab2c4addf530cb92f>:0 
  at Oxide.Plugins.WarpSystem.ForcePlayerPos (BasePlayer player, UnityEngine.Vector3 xyz) [0x00053] in <ec84069b57b947f0941aa7ce5f94aa51>:0 
  at Oxide.Plugins.WarpSystem.cmdWarp (BasePlayer player, System.String cmdd, System.String[] args) [0x0047f] in <ec84069b57b947f0941aa7ce5f94aa51>:0 
  at Oxide.Plugins.WarpSystem.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x002fe] in <ec84069b57b947f0941aa7ce5f94aa51>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <50629aa0e75d4126b345d8d9d64da28d>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <50629aa0e75d4126b345d8d9d64da28d>:0​

I have found a very similar (i guess a copy) of the ForcePlayerPos()-function here:

https://vimsky.com/examples/detail/csharp-ex---BasePlayer-SendFullSnapshot-method.html

There are 2 more lines at the end, after sending the snapshot.

void ForcePlayerPos(BasePlayer player, Vector3 xyz)
        {            
            player.SetPlayerFlag(BasePlayer.PlayerFlags.Sleeping, true);
            if (!BasePlayer.sleepingPlayerList.Contains(player)) BasePlayer.sleepingPlayerList.Add(player);

            player.CancelInvoke("InventoryUpdate");
            player.inventory.crafting.CancelAll(true);

            player.MovePosition(xyz);
            player.ClientRPCPlayer(null, player, "ForcePositionTo", xyz);
            player.SetPlayerFlag(BasePlayer.PlayerFlags.ReceivingSnapshot, true);
            player.UpdateNetworkGroup();

            player.SendNetworkUpdateImmediate(false);
            player.ClientRPCPlayer(null, player, "StartLoading");
            player.SendFullSnapshot();

//These both lines are not in plugins function.
//i inserted these lines into your plugin but the exception persists.
//I dont know if these 2 lines should be added or not
            //player.SetPlayerFlag(BasePlayer.PlayerFlags.ReceivingSnapshot, false);
            //player.ClientRPCPlayer(null, player, "FinishLoading");
        }