From d3295146c497807b16f1954de5a2a9b064fb9efc Mon Sep 17 00:00:00 2001 From: "natan.nascimento" Date: Fri, 8 Sep 2023 23:04:02 -0300 Subject: [PATCH] Move onInit() to platform module --- .../java/me/devnatan/inventoryframework/RootView.java | 11 ----------- .../devnatan/inventoryframework/DefaultRootView.java | 3 --- .../me/devnatan/inventoryframework/PlatformView.java | 5 +---- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/inventory-framework-api/src/main/java/me/devnatan/inventoryframework/RootView.java b/inventory-framework-api/src/main/java/me/devnatan/inventoryframework/RootView.java index 017da5f52..be98c9125 100644 --- a/inventory-framework-api/src/main/java/me/devnatan/inventoryframework/RootView.java +++ b/inventory-framework-api/src/main/java/me/devnatan/inventoryframework/RootView.java @@ -31,17 +31,6 @@ public interface RootView extends VirtualView { @ApiStatus.Internal Set getInternalContexts(); - /** - * Called when the view is about to be configured, the returned object will be the view's - * configuration. - *

- * As a reference, the data defined here was defined in the constructor in previous versions. - * - * @param config A mutable ViewConfigBuilder to configure this view. - */ - @ApiStatus.OverrideOnly - void onInit(ViewConfigBuilder config); - /** * The configuration for this view. * diff --git a/inventory-framework-core/src/main/java/me/devnatan/inventoryframework/DefaultRootView.java b/inventory-framework-core/src/main/java/me/devnatan/inventoryframework/DefaultRootView.java index 6a466091a..4ffb718f1 100644 --- a/inventory-framework-core/src/main/java/me/devnatan/inventoryframework/DefaultRootView.java +++ b/inventory-framework-core/src/main/java/me/devnatan/inventoryframework/DefaultRootView.java @@ -63,9 +63,6 @@ public final void setConfig(@NotNull ViewConfig config) { return pipeline; } - @Override - public void onInit(ViewConfigBuilder config) {} - @ApiStatus.Internal public @NotNull ElementFactory getElementFactory() { throw new UnsupportedOperationException("Element factory not provided"); diff --git a/inventory-framework-platform/src/main/java/me/devnatan/inventoryframework/PlatformView.java b/inventory-framework-platform/src/main/java/me/devnatan/inventoryframework/PlatformView.java index cf389e23f..96c542e3d 100644 --- a/inventory-framework-platform/src/main/java/me/devnatan/inventoryframework/PlatformView.java +++ b/inventory-framework-platform/src/main/java/me/devnatan/inventoryframework/PlatformView.java @@ -654,12 +654,9 @@ final State buildPaginationState( /** * Called when the view is about to be configured, the returned object will be the view's * configuration. - *

- * As a reference, the data defined here was defined in the constructor in previous versions. * - * @param config A mutable ViewConfigBuilder to configure this view. + * @param config A ViewConfigBuilder instance to configure this view. */ - @Override @ApiStatus.OverrideOnly public void onInit(ViewConfigBuilder config) {}