Awesome plugin - did what I wanted, but now I'm experiencing an infinite loot glitch

This plugin is awesome and it allowed me to do exactly what I wanted, namely: starting from a pure vanilla loot table, simply add "blood" as a guaranteed drop for locked crates. I was able to achieve this with the below configuration and everything has been working smoothly for a couple weeks until today when a player was able to produce infinite blood. It seems like whenever they looted the blood from the crate another one would spawn inside. This also prevented the crate from ever emptying and disappearing. Let me know if there's anything I can change in the config to try remove this error. Thank you! 

edit: I'm going to try changing "allow stacking" to false, "ignore max stack" to false, and changing "minimal amount" to 0

{
  "Refill Loot On Plugin Load": true,
  "Container Loot Save Command": "lootsave",
  "Container Refill Command": "lootrefill",
  "Load Config Command": "lootconfig",
  "Containers": [
    {
      "Entity Shortnames": [
        {
          "Shortname": "chinooklockedcrate",
          "Enable Regex": false,
          "Exclude": false,
          "API Shortname": false
        }
      ],
      "Process Corpses": true,
      "Process Loot Containers": true,
      "Monument Prefabs": [
        ""
      ],
      "Shuffle Items": false,
      "Allow Duplicate Items": false,
      "Allow Duplicate Items With Different Skins": true,
      "Remove Container": false,
      "Item Container Indexes": [
        0
      ],
      "Replace Items": false,
      "Add Items": true,
      "Modify Items": false,
      "Modify Ignores Blueprint State": false,
      "Fill With Default Items": true,
      "Online Condition": {
        "Minimal Online": -1,
        "Maximal Online": -1
      },
      "Maximal Failures To Add An Item": 5,
      "Capacity": [
        {
          "Capacity": 1,
          "Chance": 1
        }
      ],
      "Items": [
        {
          "Item Shortnames": [
            {
              "Shortname": "blood",
              "Rarity": "global",
              "Category": "global",
              "Enable Regex": false,
              "Exclude": false
            }
          ],
          "Item Name (Empty To Ignore)": "",
          "Is Blueprint": false,
          "Allow Stacking": true,
          "Ignore Max Stack": true,
          "Ignore Max Condition": true,
          "Remove Item": false,
          "Replace Item With Default Loot": false,
          "Conditions": [
            {
              "Minimal Condition": 75.0,
              "Maximal Condition": 100.0,
              "Max Condition Of Item": -1.0,
              "Condition Rate": -1.0,
              "Max Condition Rate": -1.0,
              "Chance": 1
            }
          ],
          "Skins": [
            {
              "Skin": 0,
              "Chance": 1
            }
          ],
          "Amount": [
            {
              "Minimal Amount": 1,
              "Maximal Amount": 1,
              "Rate": -1.0,
              "Chance": 1
            }
          ],
          "Chance": 1
        }
      ]
    },
    {
      "Entity Shortnames": [
        {
          "Shortname": "codelockedhackablecrate",
          "Enable Regex": false,
          "Exclude": false,
          "API Shortname": false
        }
      ],
      "Process Corpses": true,
      "Process Loot Containers": true,
      "Monument Prefabs": [
        ""
      ],
      "Shuffle Items": false,
      "Allow Duplicate Items": false,
      "Allow Duplicate Items With Different Skins": true,
      "Remove Container": false,
      "Item Container Indexes": [
        0
      ],
      "Replace Items": false,
      "Add Items": true,
      "Modify Items": false,
      "Modify Ignores Blueprint State": false,
      "Fill With Default Items": true,
      "Online Condition": {
        "Minimal Online": -1,
        "Maximal Online": -1
      },
      "Maximal Failures To Add An Item": 5,
      "Capacity": [
        {
          "Capacity": 1,
          "Chance": 1
        }
      ],
      "Items": [
        {
          "Item Shortnames": [
            {
              "Shortname": "blood",
              "Rarity": "global",
              "Category": "global",
              "Enable Regex": false,
              "Exclude": false
            }
          ],
          "Item Name (Empty To Ignore)": "",
          "Is Blueprint": false,
          "Allow Stacking": true,
          "Ignore Max Stack": true,
          "Ignore Max Condition": true,
          "Remove Item": false,
          "Replace Item With Default Loot": false,
          "Conditions": [
            {
              "Minimal Condition": 75.0,
              "Maximal Condition": 100.0,
              "Max Condition Of Item": -1.0,
              "Condition Rate": -1.0,
              "Max Condition Rate": -1.0,
              "Chance": 1
            }
          ],
          "Skins": [
            {
              "Skin": 0,
              "Chance": 1
            }
          ],
          "Amount": [
            {
              "Minimal Amount": 1,
              "Maximal Amount": 1,
              "Rate": -1.0,
              "Chance": 1
            }
          ],
          "Chance": 1
        }
      ]
    },
    {
      "Entity Shortnames": [
        {
          "Shortname": "codelockedhackablecrate_oilrig",
          "Enable Regex": false,
          "Exclude": false,
          "API Shortname": false
        }
      ],
      "Process Corpses": true,
      "Process Loot Containers": true,
      "Monument Prefabs": [
        ""
      ],
      "Shuffle Items": false,
      "Allow Duplicate Items": false,
      "Allow Duplicate Items With Different Skins": true,
      "Remove Container": false,
      "Item Container Indexes": [
        0
      ],
      "Replace Items": false,
      "Add Items": true,
      "Modify Items": false,
      "Modify Ignores Blueprint State": false,
      "Fill With Default Items": true,
      "Online Condition": {
        "Minimal Online": -1,
        "Maximal Online": -1
      },
      "Maximal Failures To Add An Item": 5,
      "Capacity": [
        {
          "Capacity": 1,
          "Chance": 1
        }
      ],
      "Items": [
        {
          "Item Shortnames": [
            {
              "Shortname": "blood",
              "Rarity": "global",
              "Category": "global",
              "Enable Regex": false,
              "Exclude": false
            }
          ],
          "Item Name (Empty To Ignore)": "",
          "Is Blueprint": false,
          "Allow Stacking": true,
          "Ignore Max Stack": true,
          "Ignore Max Condition": true,
          "Remove Item": false,
          "Replace Item With Default Loot": false,
          "Conditions": [
            {
              "Minimal Condition": 75.0,
              "Maximal Condition": 100.0,
              "Max Condition Of Item": -1.0,
              "Condition Rate": -1.0,
              "Max Condition Rate": -1.0,
              "Chance": 1
            }
          ],
          "Skins": [
            {
              "Skin": 0,
              "Chance": 1
            }
          ],
          "Amount": [
            {
              "Minimal Amount": 1,
              "Maximal Amount": 1,
              "Rate": -1.0,
              "Chance": 1
            }
          ],
          "Chance": 1
        }
      ]
    }
  ],
  "Debug": false
}

Gotta love the infinite loot glitch. It shows the players don't care to report glitches and they will take advantage of it in every way till you find out.

 

If I recall, it's caused on this plugin if you try to request a crate to hold more items then the capacity allows. It'll be in a nonstop loop trying to meet the demands so anytime someone takes a loot item out it gets refilled. 

first of all i would also disable filling with default items. but it shouldn't be doing such, it likely tries to insert it as multiple stacks? pretty weird, using debug might give more insight though on why that happens

Unfortunately after a month without issues we've again encountered the infinite loot glitch.
Here's the config we're using. It puts an additional item (blood) into locked crates as a guaranteed drop. Somehow a player is able to empty the crate, leaving only blood, then when they remove the blood the crate doesn't disappear, instead it's refilled with more blood. 

{
  "Refill Loot On Plugin Load": true,
  "Container Loot Save Command": "lootsave",
  "Container Refill Command": "lootrefill",
  "Load Config Command": "lootconfig",
  "Containers": [
    {
      "Entity Shortnames": [
        {
          "Shortname": "codelockedhackablecrate",
          "Enable Regex": false,
          "Exclude": false,
          "API Shortname": false
        }
      ],
      "Process Corpses": false,
      "Process Loot Containers": true,
      "Monument Prefabs": [
        ""
      ],
      "Shuffle Items": false,
      "Allow Duplicate Items": false,
      "Allow Duplicate Items With Different Skins": true,
      "Remove Container": false,
      "Item Container Indexes": [
        0
      ],
      "Replace Items": false,
      "Add Items": true,
      "Modify Items": false,
      "Modify Ignores Blueprint State": false,
      "Fill With Default Items": false,
      "Online Condition": {
        "Minimal Online": -1,
        "Maximal Online": -1
      },
      "Maximal Failures To Add An Item": 5,
      "Capacity": [
        {
          "Capacity": 1,
          "Chance": 1
        }
      ],
      "Items": [
        {
          "Item Shortnames": [
            {
              "Shortname": "blood",
              "Rarity": "global",
              "Category": "global",
              "Enable Regex": false,
              "Exclude": false
            }
          ],
          "Item Name (Empty To Ignore)": "",
          "Is Blueprint": false,
          "Allow Stacking": true,
          "Ignore Max Stack": true,
          "Ignore Max Condition": true,
          "Remove Item": false,
          "Replace Item With Default Loot": false,
          "Conditions": [
            {
              "Minimal Condition": 75.0,
              "Maximal Condition": 100.0,
              "Max Condition Of Item": -1.0,
              "Condition Rate": -1.0,
              "Max Condition Rate": -1.0,
              "Chance": 1
            }
          ],
          "Skins": [
            {
              "Skin": 0,
              "Chance": 1
            }
          ],
          "Amount": [
            {
              "Minimal Amount": 100,
              "Maximal Amount": 500,
              "Rate": 1.0,
              "Chance": 1
            }
          ],
          "Chance": 1
        }
      ]
    },
    {
      "Entity Shortnames": [
        {
          "Shortname": "codelockedhackablecrate_oilrig",
          "Enable Regex": false,
          "Exclude": false,
          "API Shortname": false
        }
      ],
      "Process Corpses": false,
      "Process Loot Containers": true,
      "Monument Prefabs": [
        ""
      ],
      "Shuffle Items": false,
      "Allow Duplicate Items": false,
      "Allow Duplicate Items With Different Skins": true,
      "Remove Container": false,
      "Item Container Indexes": [
        0
      ],
      "Replace Items": false,
      "Add Items": true,
      "Modify Items": false,
      "Modify Ignores Blueprint State": false,
      "Fill With Default Items": false,
      "Online Condition": {
        "Minimal Online": -1,
        "Maximal Online": -1
      },
      "Maximal Failures To Add An Item": 5,
      "Capacity": [
        {
          "Capacity": 1,
          "Chance": 1
        }
      ],
      "Items": [
        {
          "Item Shortnames": [
            {
              "Shortname": "blood",
              "Rarity": "global",
              "Category": "global",
              "Enable Regex": false,
              "Exclude": false
            }
          ],
          "Item Name (Empty To Ignore)": "",
          "Is Blueprint": false,
          "Allow Stacking": true,
          "Ignore Max Stack": true,
          "Ignore Max Condition": true,
          "Remove Item": false,
          "Replace Item With Default Loot": false,
          "Conditions": [
            {
              "Minimal Condition": 75.0,
              "Maximal Condition": 100.0,
              "Max Condition Of Item": -1.0,
              "Condition Rate": -1.0,
              "Max Condition Rate": -1.0,
              "Chance": 1
            }
          ],
          "Skins": [
            {
              "Skin": 0,
              "Chance": 1
            }
          ],
          "Amount": [
            {
              "Minimal Amount": 500,
              "Maximal Amount": 1000,
              "Rate": 1.0,
              "Chance": 1
            }
          ],
          "Chance": 1
        }
      ]
    }
  ],
  "Debug": false
}​

I didn't have "debug" set to True unfortunately, I will try that going forward. 

I think the cause has something to do with the server improperly shutting down while there is a locked crate already dropped off on the map by the helicopter. It has only happened for those locked crates and not for the oil rig locked crates. It also seems to happen after the server has had an unexpected crash.

The Oxide logs at the moment are saying the following every second

"02:33 [Warning] [DEBUG] Entity is a LootContainer. Waiting for OnLootSpawn"

 

So does it work now orangemart?

We have since switched to Extra Loot to achieve our desired functionality. 

pnCAyX8VHTGDGkg.png orangemart

We have since switched to Extra Loot to achieve our desired functionality. 

But it only adds extra it doesnt replace entirely?

Yes and for our use case that's all we needed. 

z39ON5yUKAtKgTm.png orangemart

Yes and for our use case that's all we needed. 

Ah okay, i run heavy modded so for me adding loot isnt really an option, i need to replace it entirely