aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/e.java
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-02-06 15:02:55 +0900
committersyeyoung <cyong06@naver.com>2021-02-06 15:02:55 +0900
commit00ff33e33ee694845697f807760282c0ee22f3e5 (patch)
tree26b2160598de57aee0d1982c7e0172409b199342 /src/main/java/kr/syeyoung/dungeonsguide/e.java
parente7d6517b2e1fb4aa7a5993e53739006a3fca39c8 (diff)
downloadSkyblock-Dungeons-Guide-00ff33e33ee694845697f807760282c0ee22f3e5.tar.gz
Skyblock-Dungeons-Guide-00ff33e33ee694845697f807760282c0ee22f3e5.tar.bz2
Skyblock-Dungeons-Guide-00ff33e33ee694845697f807760282c0ee22f3e5.zip
Bettuh cooldown and message
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/e.java')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/e.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/e.java b/src/main/java/kr/syeyoung/dungeonsguide/e.java
index a422c117..3666b4da 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/e.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/e.java
@@ -10,10 +10,13 @@ import kr.syeyoung.dungeonsguide.features.FeatureRegistry;
import kr.syeyoung.dungeonsguide.utils.AhUtils;
import lombok.Getter;
import net.minecraft.client.Minecraft;
+import net.minecraft.command.ICommand;
import net.minecraft.util.IChatComponent;
import net.minecraftforge.client.ClientCommandHandler;
+import net.minecraftforge.client.event.ClientChatReceivedEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
+import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import org.apache.commons.io.IOUtils;
@@ -25,6 +28,8 @@ import java.io.*;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
+import java.util.Map;
+import java.util.Set;
public class e implements c {
@@ -55,7 +60,15 @@ public class e implements c {
MinecraftForge.EVENT_BUS.register(new DungeonListener());
ClientCommandHandler.instance.registerCommand(commandDungeonsGuide = new CommandDungeonsGuide());
MinecraftForge.EVENT_BUS.register(commandDungeonsGuide);
- ClientCommandHandler.instance.registerCommand(commandReparty = new CommandReparty());
+
+ commandReparty = new CommandReparty();
+ if(!ClientCommandHandler.instance.getCommands().containsKey("rp")) {
+ ((Set<ICommand>) ObfuscationReflectionHelper.getPrivateValue(ClientCommandHandler.class, ClientCommandHandler.instance, "CommandSet")).add(commandReparty);
+ ((Map<String, ICommand>)ObfuscationReflectionHelper.getPrivateValue(ClientCommandHandler.class, ClientCommandHandler.instance, "CommandMap")).put("rp", commandReparty);
+ }
+ if (FeatureRegistry.ETC_REMOVE_REPARTY.isEnabled())
+ ClientCommandHandler.instance.registerCommand(commandReparty);
+
MinecraftForge.EVENT_BUS.register(commandReparty);
MinecraftForge.EVENT_BUS.register(new FeatureListener());
MinecraftForge.EVENT_BUS.register(new PacketListener());