In order to purge "invisible inventory" you must do a full player inventory clear
Create this plugin in your server:
(this one will clear the invisible inventory of the player when: players joins, and for players that are in the server)
clear_inventory.cs
1- if "containerMain" capacity is higher than 25, it means the player inventory capacity is modified by creative plugin
2- all items after slot 25 will be removed
3- player "containerMain" inventory capacity will be reduced to 25.
clear_inventory.cs
code in case you want to copy paste:
// unmodified
using System;
using System.Collections.Generic;
using Oxide.Core;
using System.Linq;
namespace Oxide.Plugins
{
[Info("Clear Inventory", "Ryuk_", "1.0.0")]
[Description("Clear player extra inventory caused by creative plugin.")]
public class clear_inventory : RustPlugin
{
void OnPlayerConnected(BasePlayer player)
{
ShrinkInventory(player);
}
void OnServerInitialized(bool initial)
{
foreach (var player in BasePlayer.activePlayerList)
{
ShrinkInventory(player);
}
}
private void ShrinkInventory(BasePlayer player)
{
if (player == null) return;
var container = player.inventory.containerMain;
if (container == null) return;
if (container.capacity > 25)
{
foreach (var item in container.itemList.ToList())
{
if (item.position >= 25)
{
item.RemoveFromContainer();
item.Remove();
}
}
container.capacity = 25;
}
}
}
}