I appreciate this is not what the plugin it technically for, but just making you aware
There was another post about this 6 months ago that got locked for whatever reason
https://umod.org/community/planterbox-defender/57308-not-consuming-seed
There obviously was some thought about this as there is the code for the refund, but have added bit above that to kill the planted seed if not authorised to plant.
player.ChatMessage(lang.GetMessage("Noharvest", this, player.UserIDString));
if (isSeed!=null&&!isSeed.IsDestroyed)
{
isSeed.Kill();
}
varrefund=ItemManager.CreateByName(held.info.shortname, 1);
if (refund!=null)
{
player.inventory.GiveItem(refund);
}
return;
For us we are just removing something that could potentially be explioited (we have limits on the number of planters)