fix: Adds handling empty spawner files (#2360)
This commit is contained in:
parent
04d438239d
commit
e37ad17d7d
1 changed files with 7 additions and 0 deletions
|
|
@ -202,6 +202,13 @@ public static class ImportSpawnersCommand
|
|||
try
|
||||
{
|
||||
var spawners = JsonConfig.Deserialize<List<DynamicJson>>(file.FullName);
|
||||
if (spawners == null || spawners.Count == 0)
|
||||
{
|
||||
from.SendMessage($"GenerateSpawners: Skipping empty spawner file {file.Name}");
|
||||
logger.Information("{User} is skipping empty spawner file {File}", from, file.FullName);
|
||||
return;
|
||||
}
|
||||
|
||||
using var queue = PooledRefQueue<Item>.Create();
|
||||
for (var i = 0; i < spawners.Count; i++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue