From e1270b8f1abca25e3bb3099d665c011b34eae3f5 Mon Sep 17 00:00:00 2001 From: Flemmli97 Date: Sun, 13 Jun 2021 18:07:34 +0200 Subject: [PATCH] add lang of new commands --- .../java/io/github/flemmli97/flan/commands/CommandHelp.java | 2 ++ .../java/io/github/flemmli97/flan/config/LangCommands.java | 3 ++- .../io/github/flemmli97/flan/forge/CrossPlatformStuffImpl.java | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/io/github/flemmli97/flan/commands/CommandHelp.java b/common/src/main/java/io/github/flemmli97/flan/commands/CommandHelp.java index 136b494..c7511c1 100644 --- a/common/src/main/java/io/github/flemmli97/flan/commands/CommandHelp.java +++ b/common/src/main/java/io/github/flemmli97/flan/commands/CommandHelp.java @@ -13,6 +13,7 @@ import net.minecraft.text.MutableText; import net.minecraft.text.Style; import net.minecraft.util.Formatting; +import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.stream.Collectors; @@ -26,6 +27,7 @@ public class CommandHelp { public static int helpMessage(CommandContext context, int page, Collection> nodes) { List subCommands = registeredCommands(context, nodes); + subCommands.forEach(s -> System.out.println(Arrays.toString(ConfigHandler.lang.cmdLang.getCommandHelp(s)))); int max = subCommands.size() / 8; if (page > max) page = max; diff --git a/common/src/main/java/io/github/flemmli97/flan/config/LangCommands.java b/common/src/main/java/io/github/flemmli97/flan/config/LangCommands.java index 241c472..7c1d3b0 100644 --- a/common/src/main/java/io/github/flemmli97/flan/config/LangCommands.java +++ b/common/src/main/java/io/github/flemmli97/flan/config/LangCommands.java @@ -28,10 +28,11 @@ public class LangCommands { map.put("unlockDrops", new String[]{"unlockDrops ", "Unlocks dropped items from death so other players can pick them up too. Or all of the given players (needs OP)"}); map.put("setHome", new String[]{"setHome", "Standing in a claim with sufficient permission sets that claims home to the players position"}); map.put("teleport", new String[]{"teleport self | (other ) ( | )", "Teleport to the given claims home position"}); + map.put("name", new String[]{"name self ", "Sets the current claims name"}); map.put("reload", new String[]{"reload", "Reloads the config ingame."}); map.put("adminMode", new String[]{"adminMode", "Switches to admin mode ignoring all claims."}); - map.put("readGriefPrevention", new String[]{"readGriefPreventionData", "Parses data from the GriefPrevention plugin to io.github.flemmli97.flan.Flan."}); + map.put("readGriefPrevention", new String[]{"readGriefPreventionData", "Parses data from the GriefPrevention plugin to Flan"}); map.put("setAdminClaim", new String[]{"setAdminClaim", "Sets a claim to an admin claim."}); map.put("listAdminClaims", new String[]{"listAdminClaim", "Lists all admin claims in the current world."}); map.put("adminDelete", new String[]{"adminDelete [all ]", "Force deletes the current claim or deletes all claims from the specified player."}); diff --git a/forge/src/main/java/io/github/flemmli97/flan/forge/CrossPlatformStuffImpl.java b/forge/src/main/java/io/github/flemmli97/flan/forge/CrossPlatformStuffImpl.java index 149cac3..870eccb 100644 --- a/forge/src/main/java/io/github/flemmli97/flan/forge/CrossPlatformStuffImpl.java +++ b/forge/src/main/java/io/github/flemmli97/flan/forge/CrossPlatformStuffImpl.java @@ -2,7 +2,6 @@ package io.github.flemmli97.flan.forge; import net.minecraft.entity.effect.StatusEffect; import net.minecraft.util.Identifier; -import net.minecraft.util.registry.Registry; import net.minecraftforge.fml.loading.FMLPaths; import net.minecraftforge.registries.ForgeRegistries;