From 41b46eb6f57318ebe5fcbbb7ca48baa481a66b04 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 14 Mar 2023 16:57:11 +0100 Subject: [PATCH] Add initialize call with parent for part of --- src/de/steamwar/command/AbstractSWCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/command/AbstractSWCommand.java b/src/de/steamwar/command/AbstractSWCommand.java index 7f2a383..6441d65 100644 --- a/src/de/steamwar/command/AbstractSWCommand.java +++ b/src/de/steamwar/command/AbstractSWCommand.java @@ -80,7 +80,7 @@ public abstract class AbstractSWCommand { protected void sendMessage(T sender, String message, Object[] args) { } - protected void initialisePartOf(AbstractSWCommand parent) { + protected void initialisePartOf(AbstractSWCommand parent) { } protected final void execute(T sender, String alias, String[] args) { @@ -159,7 +159,7 @@ public abstract class AbstractSWCommand { dependencyMap.get(this.getClass()).forEach(abstractSWCommand -> { abstractSWCommand.localTypeMapper.putAll((Map) localTypeMapper); abstractSWCommand.localValidators.putAll((Map) localValidators); - abstractSWCommand.initialisePartOf((AbstractSWCommand) this); + abstractSWCommand.initialisePartOf(this); abstractSWCommand.initialize(); commandList.addAll((Collection) abstractSWCommand.commandList); });