From f3ac49fd12dba55c361787140723e21145f89d42 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 24 Sep 2022 20:03:43 +0200 Subject: [PATCH 1/5] Add copy to Simulator Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 1 + BauSystem_Main/src/BauSystem_de.properties | 1 + .../features/simulator/SimulatorCommand.java | 14 ++++++++++++++ .../features/simulator/SimulatorStorage.java | 4 ++++ 4 files changed, 20 insertions(+) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index c02e1194..31f3136e 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -506,6 +506,7 @@ SIMULATOR_CREATE_HELP = §8/§esimulator create §8[§7name§8] §8-§7 Create a SIMULATOR_CHANGE_HELP = §8/§esimulator change §8-§7 Change your simulator wand selection SIMULATOR_DELETE_HELP = §8/§esimulator delete §8[§7name§8] §8-§7 Deletes the simulator SIMULATOR_START_HELP = §8/§esimulator start §8[§7name§8] §8-§7 Starts the simulator +SIMULATOR_COPY_HELP = §8/§esimulator copy §8[§7to-copy§8] §8[§7name§8] §8-§7 Copy the simulator SIMULATOR_NO_PERMS = §cYou are not allowed to use the simulator here SIMULATOR_GUI_ITEM_NAME = §eTNT Simulator diff --git a/BauSystem_Main/src/BauSystem_de.properties b/BauSystem_Main/src/BauSystem_de.properties index 77b8aaef..612ebd7c 100644 --- a/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem_Main/src/BauSystem_de.properties @@ -507,6 +507,7 @@ SIMULATOR_CREATE_HELP = §8/§esimulator create §8[§7name§8] §8-§7 Erstelle SIMULATOR_CHANGE_HELP = §8/§esimulator change §8-§7 Wechsel zu einem anderen Simulator SIMULATOR_DELETE_HELP = §8/§esimulator delete §8[§7name§8] §8-§7 Löscht den Simulator SIMULATOR_START_HELP = §8/§esimulator start §8[§7name§8] §8-§7 Startet die Simulation +SIMULATOR_COPY_HELP = §8/§esimulator copy §8[§7to-copy§8] §8[§7name§8] §8-§7 Kopiert einen Simulator SIMULATOR_NO_PERMS = §cDu darfst hier nicht den Simulator nutzen SIMULATOR_GUI_ITEM_NAME = §eTNT Simulator diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java index e97f9046..db38aabe 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCommand.java @@ -97,6 +97,20 @@ public class SimulatorCommand extends SWCommand { tntSimulator.start(p); } + @Register(value = "copy", description = "SIMULATOR_COPY_HELP") + public void copy(@Validator Player p, @Mapper("simulators") String toCopy, String name) { + TNTSimulator tntSimulator = SimulatorStorage.getSimulator(toCopy); + if (tntSimulator == null) { + BauSystem.MESSAGE.send("SIMULATOR_NOT_EXISTS", p); + return; + } + if (SimulatorStorage.getSimulator(name) != null) { + BauSystem.MESSAGE.send("SIMULATOR_NAME_ALREADY_EXISTS", p); + return; + } + SimulatorStorage.copySimulator(tntSimulator, name); + } + @Mapper("simulators") public TypeMapper allSimulators() { return new TypeMapper() { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorStorage.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorStorage.java index a75196c1..074298d8 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorStorage.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorStorage.java @@ -115,6 +115,10 @@ public class SimulatorStorage implements Enable, Disable { new File(simulatorsDir, name + ".simulator").delete(); } + public static void copySimulator(TNTSimulator tntSimulator, String name) { + tntSimulators.put(name, new TNTSimulator(tntSimulator.toYAPION())); + } + public static void removeSimulator(ItemStack itemStack) { if (!ItemUtils.isItem(itemStack, "simulator")) { return; From 6a3f53a1c1499111512a70dae1f01f5444c47d9f Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 24 Sep 2022 20:04:26 +0200 Subject: [PATCH 2/5] Add eta to laufbau states Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 2 +- BauSystem_Main/src/BauSystem_de.properties | 2 +- .../bausystem/features/slaves/laufbau/Laufbau.java | 2 +- .../laufbau/states/CreatingInnerBlocksState.java | 13 +++++++------ .../laufbau/states/CreatingOuterBlocksState.java | 4 +++- .../slaves/laufbau/states/ExpandingTracesState.java | 4 +++- .../slaves/laufbau/states/FilteringTracesState.java | 4 +++- .../slaves/laufbau/states/LaufbauState.java | 9 +++++++++ .../laufbau/states/ProcessingTracesState.java | 4 +++- .../laufbau/states/ShrinkingOuterPointsState.java | 4 +++- .../slaves/laufbau/states/SplittingPointsState.java | 4 +++- 11 files changed, 37 insertions(+), 15 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 31f3136e..cb099247 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -1116,7 +1116,7 @@ LAUFBAU_STATE_SPLITTING_POINTS = Splitting points LAUFBAU_STATE_SHRINKING_POINTS = Shrinking points LAUFBAU_STATE_CREATING_INNER_BLOCKS = Creating inner blocks LAUFBAU_STATE_CREATING_OUTER_BLOCKS = Creating outer blocks -LAUFBAU_SIMPLE_PROGRESS = §e{0}§8: §e{1}§8/§e{2} +LAUFBAU_SIMPLE_PROGRESS = §e{0}§8: §e{1}§8/§e{2} §7Time left§8: §e{3} LAUFBAU_DONE = §aDone LAUFBAU_SETTINGS_GUI_NAME = §eLaufbau diff --git a/BauSystem_Main/src/BauSystem_de.properties b/BauSystem_Main/src/BauSystem_de.properties index 612ebd7c..5382d787 100644 --- a/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem_Main/src/BauSystem_de.properties @@ -1095,7 +1095,7 @@ LAUFBAU_STATE_SPLITTING_POINTS = Punkte trennen LAUFBAU_STATE_SHRINKING_POINTS = Punkte ausdünnen LAUFBAU_STATE_CREATING_INNER_BLOCKS = Innenraum füllen LAUFBAU_STATE_CREATING_OUTER_BLOCKS = Mantel bauen -LAUFBAU_SIMPLE_PROGRESS = §e{0}§8: §e{1}§8/§e{2} +LAUFBAU_SIMPLE_PROGRESS = §e{0}§8: §e{1}§8/§e{2} §7Übrige Zeit §8: §e{3} LAUFBAU_DONE = §aZuende gebaut LAUFBAU_SETTINGS_GUI_NAME = §eLaufbau diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Laufbau.java b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Laufbau.java index 5a535c4c..6c22c4aa 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Laufbau.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Laufbau.java @@ -116,7 +116,7 @@ public class Laufbau { return; } if (shrinkingOuterPointsState != null) { - creatingInnerBlocksState = new CreatingInnerBlocksState(splittingPointsState.getInnerPoints(), world, processingTracesState.getCuboidList(), splittingPointsState.getIntersectedCuboid(), editSession, elements, preferingBlastResistance); + creatingInnerBlocksState = new CreatingInnerBlocksState(splittingPointsState.getInnerPoints(), world, splittingPointsState.getIntersectedCuboid(), editSession, elements); return; } if (splittingPointsState != null) { diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/CreatingInnerBlocksState.java b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/CreatingInnerBlocksState.java index 67a1fb9b..6e6b3be1 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/CreatingInnerBlocksState.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/CreatingInnerBlocksState.java @@ -30,36 +30,37 @@ import org.bukkit.Location; import org.bukkit.World; import org.bukkit.entity.Player; +import java.text.SimpleDateFormat; +import java.time.Instant; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.Map; import java.util.stream.Collectors; public class CreatingInnerBlocksState implements LaufbauState { + private long start = System.currentTimeMillis(); + private List innerBlocks; private int index = 0; private World world; - private List cuboidList; private Map> intersectedCuboid; private EditSession editSession; private List elements; - private boolean preferingBlastResistance; - public CreatingInnerBlocksState(List innerBlocks, World world, List cuboidList, Map> intersectedCuboid, EditSession editSession, List elements, boolean preferingBlastResistance) { + public CreatingInnerBlocksState(List innerBlocks, World world, Map> intersectedCuboid, EditSession editSession, List elements) { this.innerBlocks = innerBlocks; this.world = world; - this.cuboidList = cuboidList; this.intersectedCuboid = intersectedCuboid; this.editSession = editSession; this.elements = elements; - this.preferingBlastResistance = preferingBlastResistance; } @Override public String actionBarMessage(Player p) { - return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_CREATING_INNER_BLOCKS", p), index, innerBlocks.size()); + return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_CREATING_INNER_BLOCKS", p), index, innerBlocks.size(), eta(p, start, index, innerBlocks.size())); } @Override diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/CreatingOuterBlocksState.java b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/CreatingOuterBlocksState.java index 6c97b5f8..991ca014 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/CreatingOuterBlocksState.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/CreatingOuterBlocksState.java @@ -41,6 +41,8 @@ public class CreatingOuterBlocksState implements LaufbauState { SHELL = BlockTypes.get("minecraft:end_stone").getDefaultState().toBaseBlock(); } + private long start = System.currentTimeMillis(); + private List outerBlocks; private int index = 0; @@ -55,7 +57,7 @@ public class CreatingOuterBlocksState implements LaufbauState { @Override public String actionBarMessage(Player p) { - return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_CREATING_OUTER_BLOCKS", p), index, outerBlocks.size()); + return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_CREATING_OUTER_BLOCKS", p), index, outerBlocks.size(), eta(p, start, index, outerBlocks.size())); } @Override diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ExpandingTracesState.java b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ExpandingTracesState.java index 595b828b..33a9004d 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ExpandingTracesState.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ExpandingTracesState.java @@ -36,6 +36,8 @@ import java.util.function.BiPredicate; public class ExpandingTracesState implements LaufbauState { + private long start = System.currentTimeMillis(); + private List cuboidList; private int totalCuboids; @@ -54,7 +56,7 @@ public class ExpandingTracesState implements LaufbauState { @Override public String actionBarMessage(Player p) { - return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_EXPANDING_TRACES", p), totalCuboids - cuboidList.size(), totalCuboids); + return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_EXPANDING_TRACES", p), totalCuboids - cuboidList.size(), totalCuboids, eta(p, start, totalCuboids - cuboidList.size(), totalCuboids)); } @Override diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/FilteringTracesState.java b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/FilteringTracesState.java index ac4e8de6..55e4a0fa 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/FilteringTracesState.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/FilteringTracesState.java @@ -35,6 +35,8 @@ import java.util.function.BiPredicate; public class FilteringTracesState implements LaufbauState { + private long start = System.currentTimeMillis(); + private World world; private BiPredicate inRegionCheck; @@ -55,7 +57,7 @@ public class FilteringTracesState implements LaufbauState { @Override public String actionBarMessage(Player p) { - return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_FILTERING_TRACES", p), totalRecord - recordList.size(), totalRecord); + return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_FILTERING_TRACES", p), totalRecord - recordList.size(), totalRecord, eta(p, start, totalRecord - recordList.size(), totalRecord)); } @Override diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/LaufbauState.java b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/LaufbauState.java index 4d6b6e89..3401914d 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/LaufbauState.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/LaufbauState.java @@ -19,8 +19,13 @@ package de.steamwar.bausystem.features.slaves.laufbau.states; +import de.steamwar.bausystem.BauSystem; import org.bukkit.entity.Player; +import java.text.SimpleDateFormat; +import java.time.Instant; +import java.util.Date; + public interface LaufbauState { String actionBarMessage(Player p); @@ -28,4 +33,8 @@ public interface LaufbauState { boolean hasNext(); void next(); + + default String eta(Player p, long start, int done, int total) { + return new SimpleDateFormat(BauSystem.MESSAGE.parse("TIME", p)).format(Date.from(Instant.ofEpochMilli((System.currentTimeMillis() - start) / done * total))); + } } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ProcessingTracesState.java b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ProcessingTracesState.java index 5748907c..ead42c62 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ProcessingTracesState.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ProcessingTracesState.java @@ -31,6 +31,8 @@ import java.util.List; public class ProcessingTracesState implements LaufbauState { + private long start = System.currentTimeMillis(); + private int totalTNTPositions; private List tntPositionList; @@ -44,7 +46,7 @@ public class ProcessingTracesState implements LaufbauState { @Override public String actionBarMessage(Player p) { - return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_PROCESSING_TRACES", p), totalTNTPositions - tntPositionList.size(), totalTNTPositions); + return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_PROCESSING_TRACES", p), totalTNTPositions - tntPositionList.size(), totalTNTPositions, eta(p, start, totalTNTPositions - tntPositionList.size(), totalTNTPositions)); } @Override diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ShrinkingOuterPointsState.java b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ShrinkingOuterPointsState.java index 8ee9ed0a..487b9991 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ShrinkingOuterPointsState.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/ShrinkingOuterPointsState.java @@ -29,6 +29,8 @@ import java.util.List; public class ShrinkingOuterPointsState implements LaufbauState { + private long start = System.currentTimeMillis(); + private List outerPoints; private List innerPoints; private int index = 0; @@ -43,7 +45,7 @@ public class ShrinkingOuterPointsState implements LaufbauState { @Override public String actionBarMessage(Player p) { - return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_SHRINKING_POINTS", p), index, outerPoints.size()); + return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_SHRINKING_POINTS", p), index, outerPoints.size(), eta(p, start, index, outerPoints.size())); } @Override diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/SplittingPointsState.java b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/SplittingPointsState.java index ae60172b..2a61dd44 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/SplittingPointsState.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/SplittingPointsState.java @@ -32,6 +32,8 @@ public class SplittingPointsState implements LaufbauState { private static final Cuboid ONE = new Cuboid(0, 0, 0, 1, 1, 1); private static final Cuboid ABOVE_HALF = new Cuboid(0, 1, 0, 1, 0.5, 1); + private long start = System.currentTimeMillis(); + private List blocks; private int totalBlocks; private List cuboidList; @@ -53,7 +55,7 @@ public class SplittingPointsState implements LaufbauState { @Override public String actionBarMessage(Player p) { - return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_SPLITTING_POINTS", p), totalBlocks - blocks.size(), totalBlocks); + return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_SPLITTING_POINTS", p), totalBlocks - blocks.size(), totalBlocks, eta(p, start, totalBlocks - blocks.size(), totalBlocks)); } @Override From d888545e8f5f597f61128432d5417f78cba9cc7f Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 24 Sep 2022 20:05:17 +0200 Subject: [PATCH 3/5] Fix some translations Signed-off-by: yoyosource --- BauSystem_Main/build.gradle | 2 +- BauSystem_Main/src/BauSystem.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/build.gradle b/BauSystem_Main/build.gradle index 34c40b56..713bb47b 100644 --- a/BauSystem_Main/build.gradle +++ b/BauSystem_Main/build.gradle @@ -33,7 +33,7 @@ targetCompatibility = 1.8 sourceSets { main { java { - srcDirs = ['src/'] + srcDirs = ['src/', 'build/generated/sources/annotationProcessor/java/main/'] } resources { srcDirs = ['src/'] diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index cb099247..6f55ccaa 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -670,7 +670,7 @@ TICK_STEP_SINGLE_HELP = §8/§etick step §8- §7Step one tick TICK_WARP_HELP = §8/§etick warp §8<§7Ticks§8> §8- §7Warp n ticks TICK_CANCEL_HELP = §8/§etick cancel §8- §7Cancels tick step/warp TICK_ERROR = §cYou can not activate another §8'§e/tick step§8'§c or §8'§e/tick warp§8'§c -TICK_CANCEL_ERROR = §cYou hvae no §8'§e/tick step§8'§c or §8'§e/tick warp§8'§c active +TICK_CANCEL_ERROR = §cYou have no §8'§e/tick step§8'§c or §8'§e/tick warp§8'§c active TICK_STEP = §eSkipping {0} ticks TICK_STEP_LEFT = §eSkipping {0} more ticks TICK_WARP = §eWarping {0} ticks From 17ff693b789ebdc114b88eb0278d586910c6e7db Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 24 Sep 2022 20:06:08 +0200 Subject: [PATCH 4/5] Fix some translations Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 10 +++++----- BauSystem_Main/src/BauSystem_de.properties | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 6f55ccaa..8d81df63 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -135,7 +135,7 @@ BAU_INFO_ITEM_LORE_FIRE = §7Fire§8: §e{0} BAU_INFO_ITEM_LORE_COLOR = §7Color§8: §e{0} BAU_INFO_ITEM_LORE_PROTECT = §7Protect§8: §e{0} -BAU_INFO_COMMAND_HELP = §8/§ebauinfo §8- §7Information regarding this Bau +BAU_INFO_COMMAND_HELP = §8/§ebauinfo §8- §7Information regarding this build server BAU_INFO_COMMAND_OWNER = §7Owner: §e{0} BAU_INFO_COMMAND_MEMBER = §7Member: §e BAU_INFO_MEMBER_INFO = §e{0}§8[{1}§8,{2}§8] §8 @@ -189,7 +189,7 @@ HOTBAR_HELP_GENERIC=§7Saves a hotbar. While joining a bau with an empty invento HOTBAR_HELP_SAVE=§8/§ehotbar save §8-§7 Saves your current hotbar HOTBAR_HELP_LOAD=§8/§ehotbar load §8-§7 Loads the saved hotbar HOTBAR_HELP_SHOW=§8/§ehotbar show §8-§7 Displays the saved hotbar -HOTBAR_SAVED=§7Hotbar saves +HOTBAR_SAVED=§7Hotbar saved HOTBAR_LOADED=§7Hotbar loaded HOTBAR_INVENTORY=Standard hotbar # GUI @@ -229,8 +229,8 @@ SCRIPT_COMMAND_ERROR_FOURTH_ARG_NOVALUE = §cThe fourth argument is missing and SCRIPT_COMMAND_ERROR_BOOLEAN_COMPARE = §cOnly booleans can be compared SCRIPT_COMMAND_ERROR_NUMBER_COMPARE = §cOnly numbers can be compared -SCRIPT_COMMAND_ERROR_ONLY_STRINGS_ALLOWED = §cOnly strings can be compared -SCRIPT_COMMAND_ERROR_ONLY_NUMBERS_ALLOWED = §cOnly numbers can be compared +SCRIPT_COMMAND_ERROR_ONLY_STRINGS_ALLOWED = §cOnly strings are allowed +SCRIPT_COMMAND_ERROR_ONLY_NUMBERS_ALLOWED = §cOnly numbers are allowed ## Commands SCRIPT_COMMAND_ARITHMETIC_ADD_HELP_1 = §eadd §8<§7variable§8> §8<§7variable§8|§7value§8> @@ -249,7 +249,7 @@ SCRIPT_COMMAND_ARITHMETIC_MUL_HELP_3 = Multiplication between the two last varia SCRIPT_COMMAND_ARITHMETIC_MUL_ERROR = §cOnly numbers can be multiplied SCRIPT_COMMAND_ARITHMETIC_SUB_HELP_1 = §esub §8<§7variable§8> §8<§7variable§8|§7value§8> -SCRIPT_COMMAND_ARITHMETIC_SUB_HELP_2 = §esub §8<§7variable§8> §8<§7variable§8§8|§7value> §8<§7variable§8|§7value§8> +SCRIPT_COMMAND_ARITHMETIC_SUB_HELP_2 = §esub §8<§7variable§8> §8<§7variable§8§8|§7value§8> §8<§7variable§8|§7value§8> SCRIPT_COMMAND_ARITHMETIC_SUB_HELP_3 = Subtraction between the two last variables and writes the result in the first one SCRIPT_COMMAND_ARITHMETIC_SUB_ERROR = §cOnly numbers can be subtracted diff --git a/BauSystem_Main/src/BauSystem_de.properties b/BauSystem_Main/src/BauSystem_de.properties index 5382d787..ddeb7c4e 100644 --- a/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem_Main/src/BauSystem_de.properties @@ -97,7 +97,6 @@ AUTOSTART_MESSAGE_NO_REGION = §cDu befindest dich derzeit in keiner Region AUTOSTART_MESSAGE_RESET = §eDer AutostartTimer wurde zurückgesetzt AUTOSTART_MESSAGE_START = §eAutostartTimer gestartet AUTOSTART_MESSAGE_RESULT1 = §eZeit §7bis zur §eExplosion §7am Gegner§8:§e {0} -AUTOSTART_MESSAGE_DATE_PATTERN=mm:ss SSSS AUTOSTART_MESSAGE_RESULT2 = §eZeitdifferenz in ticks §7bis {0} Sekunden§8:§e {1} AUTOSTART_MESSAGE_RESULT3 = §7Positiv, wenn zu wenig, negativ wenn zu viel @@ -245,7 +244,7 @@ SCRIPT_COMMAND_ARITHMETIC_DIV_HELP_3 = Division zwischen den letzten beiden Vari SCRIPT_COMMAND_ARITHMETIC_DIV_ERROR = §cNur Zahlen können dividiert werden SCRIPT_COMMAND_ARITHMETIC_MUL_HELP_1 = §emul §8<§7Variable§8> §8<§7Variable§8|§7Wert§8> -SCRIPT_COMMAND_ARITHMETIC_MUL_HELP_2 = §emul §8<§7Variable§8> §8<§7Variable§8§8|§7Wert> §8<§7Variable§8|§7Wert§8> +SCRIPT_COMMAND_ARITHMETIC_MUL_HELP_2 = §emul §8<§7Variable§8> §8<§7Variable§8§8|§7Wert§8> §8<§7Variable§8|§7Wert§8> SCRIPT_COMMAND_ARITHMETIC_MUL_HELP_3 = Multiplikation zwischen den letzten beiden Variablen und schreibt es in die erste. SCRIPT_COMMAND_ARITHMETIC_MUL_ERROR = §cNur Zahlen können multipliziert werden From fae3a3d928b27846f030296e4413a88e67f51b0f Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 24 Sep 2022 20:06:55 +0200 Subject: [PATCH 5/5] Remove useless messages Signed-off-by: yoyosource --- BauSystem_Main/src/BauSystem.properties | 8 -------- BauSystem_Main/src/BauSystem_de.properties | 8 -------- .../src/de/steamwar/bausystem/Permission.java | 16 ---------------- 3 files changed, 32 deletions(-) diff --git a/BauSystem_Main/src/BauSystem.properties b/BauSystem_Main/src/BauSystem.properties index 8d81df63..ca7b8228 100644 --- a/BauSystem_Main/src/BauSystem.properties +++ b/BauSystem_Main/src/BauSystem.properties @@ -27,14 +27,6 @@ PAGE_LIST=§e Page ({0}/{1}) »» LIST_PREVIOUS_PAGE=§ePrevious page LIST_NEXT_PAGE=§eNext page -# Permission -PERMISSION_WORLD = change settings -PERMISSION_WORLD_EDIT = use WorldEdit -PERMISSION_CHANGE_YOU_ENABLE = §aThe player is now allowed to {0} -PERMISSION_CHANGE_YOU_DISABLE = §cThe player is now not allowed to {0} -PERMISSION_CHANGE_OTHER_ENABLE = §aYou are allowed to join the World of §6{0} §a{1} -PERMISSION_CHANGE_OTHER_DISABLE = §cYou are no longer allowed to join the World of §6{0} §c{1} - # Scoreboard SCOREBOARD_TIME = Time SCOREBOARD_REGION = Region diff --git a/BauSystem_Main/src/BauSystem_de.properties b/BauSystem_Main/src/BauSystem_de.properties index ddeb7c4e..be092402 100644 --- a/BauSystem_Main/src/BauSystem_de.properties +++ b/BauSystem_Main/src/BauSystem_de.properties @@ -27,14 +27,6 @@ PAGE_LIST=§e Seite ({0}/{1}) »» LIST_PREVIOUS_PAGE=§eVorherige Seite LIST_NEXT_PAGE=§eNächste Seite -# Permission -PERMISSION_WORLD = Einstellungen vornehmen -PERMISSION_WORLD_EDIT = WorldEdit verwenden -PERMISSION_CHANGE_YOU_ENABLE = §aDer Spieler darf nun {0} -PERMISSION_CHANGE_YOU_DISABLE = §cDer Spieler darf nun nicht mehr {0} -PERMISSION_CHANGE_OTHER_ENABLE = §aDu kannst nun auf der Welt von §6{0} §a{1} -PERMISSION_CHANGE_OTHER_DISABLE = §cDu kannst nun nicht mehr auf der Welt von §6{0} §c{1} - # Scoreboard SCOREBOARD_TIME = Uhrzeit SCOREBOARD_REGION = Region diff --git a/BauSystem_Main/src/de/steamwar/bausystem/Permission.java b/BauSystem_Main/src/de/steamwar/bausystem/Permission.java index 9de5e1e1..539a0f80 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/Permission.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/Permission.java @@ -54,20 +54,4 @@ public enum Permission { public static boolean hasPermission(Player member, Permission permission) { return permission.hasPermission(member); } - - private static void sendMessages(Player player, boolean ableTo, BauweltMember target, String what) { - Player targetPlayer = Bukkit.getPlayer(SteamwarUser.get(target.getMemberID()).getUUID()); - if (targetPlayer != null) { - if (ableTo) { - BauSystem.MESSAGE.send("PERMISSION_CHANGE_OTHER_ENABLE", targetPlayer, player.getName(), BauSystem.MESSAGE.parse(what, targetPlayer)); - } else { - BauSystem.MESSAGE.send("PERMISSION_CHANGE_OTHER_DISABLE", targetPlayer, player.getName(), BauSystem.MESSAGE.parse(what, targetPlayer)); - } - } - if (ableTo) { - BauSystem.MESSAGE.send("PERMISSION_CHANGE_YOU_ENABLE", player, BauSystem.MESSAGE.parse(what, player)); - } else { - BauSystem.MESSAGE.send("PERMISSION_CHANGE_YOU_DISABLE", player, BauSystem.MESSAGE.parse(what, player)); - } - } } \ No newline at end of file