OnItemSplit conflict with CustomMagazine ( paid plugin ) support requestSolved
Calling hook OnItemSplit resulted in a conflict between the following plugins: CustomMagazine - Item.weapon.mod.extendedmagsx2.14382607 (Item), StackModifier (Item.weapon.mod.extendedmagsx2.14382609 (Item))

Getting the above conflict in console.
Seems to be most consistent when moving from storage to player inventory, but happens both ways at times.
Items from the stack disappear on movement either direction sometimes but mostly when moving from storage to player inventory.
Worst part though is happening with just normal storage as well, small or large boxes to player inventory result in the same.
Got a bit stumped looking at it and had a bunch of other projects so will revisit this or might revert for the time being.
Not a big deal at all but wanted to share the feedback.

Still one thing we need to address in Custom Magazine itself but that's something that is happening with RestoreOnDeath and is a minor issue.
Wouldn't have anything to do with this either.

He shouldn't be using that hook, he should unsubscribe if mine is detected

[PluginReference] private Plugin StackModifier;

private void Init()
{
    Unsubscribe(nameof(OnItemSplit));
}

private void OnServerInitialized()
{
    if (StackModifier == null)
        Subscribe(nameof(OnItemSplit));
}

private void OnPluginLoaded(Plugin name)
{
    if (StackModifier != null && name.Name == StackModifier.Name)
        Unsubscribe(nameof(OnItemSplit));
}

private void OnPluginUnloaded(Plugin name)
{
    if (StackModifier != null && name.Name == StackModifier.Name)
        Subscribe(nameof(OnItemSplit));
}​
Locked automatically