diff --git a/minecraft/src/main/java/dev/dediamondpro/minemark/minecraft/MineMarkDrawable.java b/minecraft/src/main/java/dev/dediamondpro/minemark/minecraft/MineMarkDrawable.java index cb1abd5..3f5d3bc 100644 --- a/minecraft/src/main/java/dev/dediamondpro/minemark/minecraft/MineMarkDrawable.java +++ b/minecraft/src/main/java/dev/dediamondpro/minemark/minecraft/MineMarkDrawable.java @@ -38,7 +38,7 @@ import java.io.IOException; import java.io.Reader; -public class MineMarkDrawable { +public class MineMarkDrawable implements AutoCloseable { public static final MineMarkCore DEFAULT_CORE = addMinecraftExtensions(MineMarkCore.builder()) .addExtension(StrikethroughExtension.create()) .addExtension(TablesExtension.create()) diff --git a/src/main/java/dev/dediamondpro/minemark/elements/Element.java b/src/main/java/dev/dediamondpro/minemark/elements/Element.java index 2c08bcc..acb936d 100644 --- a/src/main/java/dev/dediamondpro/minemark/elements/Element.java +++ b/src/main/java/dev/dediamondpro/minemark/elements/Element.java @@ -28,13 +28,12 @@ import org.jetbrains.annotations.Nullable; import org.xml.sax.Attributes; -import java.io.Closeable; import java.util.ArrayList; /** * Base class for an element that should render content, only one can apply per HTML tag. */ -public abstract class Element implements Closeable { +public abstract class Element implements AutoCloseable { protected final @Nullable Element parent; protected final ArrayList> children = new ArrayList<>(); protected final String qName;