NBTExplorer/NBTUtil/Ops/DeleteOperation.cs
2020-06-27 20:21:06 -07:00

25 lines
610 B
C#

using System;
using System.Collections.Generic;
using System.IO;
using NBTExplorer.Model;
namespace NBTUtil.Ops
{
class DeleteOperation : ConsoleOperation
{
public override bool OptionsValid (ConsoleOptions options)
{
return true;
}
public override bool CanProcess (DataNode dataNode)
{
return (dataNode != null) && dataNode.CanDeleteNode && (dataNode.Root != dataNode);
}
public override bool Process (DataNode dataNode, ConsoleOptions options)
{
return dataNode.DeleteNode();
}
}
}