diff --git a/src/main/java/run/halo/moments/MomentsPlugin.java b/src/main/java/run/halo/moments/MomentsPlugin.java index ff7cf68..51b1939 100644 --- a/src/main/java/run/halo/moments/MomentsPlugin.java +++ b/src/main/java/run/halo/moments/MomentsPlugin.java @@ -7,6 +7,7 @@ import java.util.Set; import org.apache.commons.lang3.BooleanUtils; import org.springframework.stereotype.Component; +import run.halo.app.extension.Scheme; import run.halo.app.extension.SchemeManager; import run.halo.app.extension.index.IndexSpec; import run.halo.app.plugin.BasePlugin; @@ -68,6 +69,6 @@ public void start() { @Override public void stop() { - schemeManager.unregister(schemeManager.get(Moment.class)); + schemeManager.unregister(Scheme.buildFromType(Moment.class)); } }