Bag of Holding

DISCUSSION Bag of Holding 1.10.5

Just4Free

Plugin Smuggler
Level 3
Staff member
Vault+ Full Benefactor Lifeline Halloween 2026 Level 3
Joined
Jan 16, 2024
Messages
727
Reaction Score
10,677
Shards
Shards 65,680
ClientRPCPlayer is obsolete.

for the June/July update:
around line 3027:
private static void ClosePlayerInventory(BasePlayer player)
{
[I] player.ClientRPCPlayer(null, player, "OnRespawnInformation"); <====OLD (remove)[/I]
player.ClientRPC(RpcTarget.Player("OnRespawnInformation", player)); ==== NEW
}

Around line 3214:
private static void StartLootingCorpse(BasePlayer player, LootableCorpse corpse, BasePlayer targetPlayer = null)
{
if (player.CanInteract()
&& corpse.CanLoot()
&& corpse.containers != null
&& Interface.CallHook("CanLootEntity", player, corpse) == null
&& player.inventory.loot.StartLootingEntity(corpse))
{
corpse.SetFlag(Flags.Open, true);
if (targetPlayer is not null)
{
player.inventory.loot.AddContainer(targetPlayer.inventory.containerMain);
player.inventory.loot.AddContainer(targetPlayer.inventory.containerWear);
player.inventory.loot.AddContainer(targetPlayer.inventory.containerBelt);
player.inventory.loot.PositionChecks = false;
}
else
{
foreach (var container in corpse.containers)
{
player.inventory.loot.AddContainer(container);
}
}
player.inventory.loot.SendImmediate();
corpse.ClientRPCPlayer(null, player, "RPC_ClientLootCorpse"); <===OLD (remove)
corpse.ClientRPC(RpcTarget.Player("RPC_ClientLootCorpse", player)); <=== NEW
corpse.SendNetworkUpdate();
}
}

Around line 3243:
private static void StartLootingDroppedItemContainer(BasePlayer player, DroppedItemContainer containerEntity)
{
if (containerEntity.inventory != null
&& player.CanInteract()
&& Interface.CallHook("CanLootEntity", player, containerEntity) == null
&& player.inventory.loot.StartLootingEntity(containerEntity))
{
containerEntity.SetFlag(Flags.Open, true);
player.inventory.loot.AddContainer(containerEntity.inventory);
player.inventory.loot.SendImmediate();
player.ClientRPCPlayer(null, player, "RPC_OpenLootPanel", containerEntity.lootPanelName); <===OLD (remove)
player.ClientRPC(RpcTarget.Player("RPC_OpenLootPanel", player), containerEntity.lootPanelName); <=== NEW
containerEntity.SendNetworkUpdate();
}
}

Around 3899:
player.inventory.loot.AddContainer(item.contents);
player.inventory.loot.SendImmediate();
player.ClientRPCPlayer(null, player, "RPC_OpenLootPanel", GenericResizableLootPanelName); <=== OLD (remove)
player.ClientRPC(RpcTarget.Player("RPC_OpenLootPanel", player), GenericResizableLootPanelName); <== NEW
ExposedHooks.OnBagOpened(item, player);
}
private bool ShouldDelayOpening(LootPanelInfo currentInfo, LootPanelInfo nextInfo)
{
return nextInfo.Capacity > currentInfo.Capacity
&& currentInfo.PanelName == GenericResizableLootPanelName
&& nextInfo.PanelName == GenericResizableLootPanelName;
}
 
Back