From 1e9f7e7cf120d1cb124ad000099190f370db412f Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 27 Apr 2021 20:18:04 +0200 Subject: [PATCH] Fix SpecialCommand.description --- .../bausystem/features/script/SpecialCommand.java | 11 ++--------- .../bausystem/features/script/command/Exit.java | 8 ++++++-- .../bausystem/features/script/command/If.java | 2 +- .../bausystem/features/script/command/Jump.java | 8 ++++++-- .../bausystem/features/script/command/Sleep.java | 8 ++++++-- 5 files changed, 21 insertions(+), 16 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/SpecialCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/SpecialCommand.java index d001be9e..7fcfd937 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/SpecialCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/SpecialCommand.java @@ -2,15 +2,8 @@ package de.steamwar.bausystem.features.script; public interface SpecialCommand { - default String[] descriptions() { - if (description().equals("")) { - return new String[0]; - } - return new String[]{description()}; - } - - default String description() { - return ""; + default String[] description() { + return new String[0]; } String command(); diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/Exit.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/Exit.java index 4c4e6e91..2e2025d1 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/Exit.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/Exit.java @@ -9,8 +9,12 @@ import de.steamwar.bausystem.linkage.Linked; public class Exit implements SpecialCommand { @Override - public String description() { - return "§eexit §8-§7 Beendet das ausführen des Scripts."; + public String[] description() { + return new String[]{ + "§eexit", + "", + "Beendet das ausführen des Scripts." + }; } @Override diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/If.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/If.java index ca803ea0..24d84d35 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/If.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/If.java @@ -11,7 +11,7 @@ import de.steamwar.bausystem.linkage.Linked; public class If implements SpecialCommand { @Override - public String[] descriptions() { + public String[] description() { return new String[]{ "§eif §8<§7Variable§8/§7Wert§8> §8<§7Variable§8/§7Wert§8> §8<§7Jump-Point§8>", "§eif §8<§7Variable§8/§7Wert§8> §8<§7Variable§8/§7Wert§8> §8<§7Jump-Point§8> §8<§7Jump-Point§8>", diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/Jump.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/Jump.java index 7ed5fd64..60bb28a4 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/Jump.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/Jump.java @@ -10,8 +10,12 @@ import de.steamwar.bausystem.linkage.Linked; public class Jump implements SpecialCommand { @Override - public String description() { - return "§ejump §8<§7Jump-Point§8> §8- §7Springe zu einer anderen Zeile. Hierbei ist ein Jump-Point eine Zeile mit §8'§7.§8'§7 vor."; + public String[] description() { + return new String[]{ + "§ejump §8<§7Jump-Point§8>", + "", + "§7Springe zu einer anderen Zeile. Hierbei ist ein Jump-Point eine Zeile mit §8'§7.§8'§7 vor." + }; } @Override diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/Sleep.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/Sleep.java index f3f3e19e..3e88313f 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/Sleep.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/Sleep.java @@ -11,8 +11,12 @@ import org.bukkit.Bukkit; public class Sleep implements SpecialCommand { @Override - public String description() { - return "§esleep §8<§8Time§8> §8-§7 Pausiert das Ausführen des Scripts. Das erste Argument ist in GameTicks"; + public String[] description() { + return new String[]{ + "§esleep §8<§8Time§8>", + "", + "Pausiert das Ausführen des Scripts. Das erste Argument ist in GameTicks." + }; } @Override