aboutsummaryrefslogtreecommitdiff
path: root/mod/src/main/java/kr/syeyoung/dungeonsguide
diff options
context:
space:
mode:
Diffstat (limited to 'mod/src/main/java/kr/syeyoung/dungeonsguide')
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessor.java16
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java4
2 files changed, 14 insertions, 6 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessor.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessor.java
index 003b5a44..206aed96 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessor.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessor.java
@@ -100,12 +100,16 @@ public class ChatProcessor {
ChatSubscriber chatSubscribed = it.next();
context.put("removed", processed);
context.put("onceListenered", listened);
- ChatProcessResult chatProcessResult = chatSubscribed.process(txt, context);
- if (chatProcessResult.isRemoveChat()) processed++;
- if (chatProcessResult.isRemoveListener()) listened++;
-
- if (chatProcessResult.isRemoveChat()) chatReceivedEvent.setResult(Event.Result.DENY);
- if (chatProcessResult.isRemoveListener()) it.remove();
+ try {
+ ChatProcessResult chatProcessResult = chatSubscribed.process(txt, context);
+ if (chatProcessResult.isRemoveChat()) processed++;
+ if (chatProcessResult.isRemoveListener()) listened++;
+
+ if (chatProcessResult.isRemoveChat()) chatReceivedEvent.setResult(Event.Result.DENY);
+ if (chatProcessResult.isRemoveListener()) it.remove();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
}
}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java
index a75b11fb..95d7367c 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java
@@ -48,6 +48,7 @@ import kr.syeyoung.dungeonsguide.mod.utils.MapUtils;
import kr.syeyoung.dungeonsguide.mod.wsresource.StaticResourceCache;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
+import net.minecraft.client.settings.GameSettings;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
@@ -186,6 +187,9 @@ public class CommandDgDebug extends CommandBase {
case "clearprofile":
clearProfileCommand();
break;
+ case "gimmebright":
+ Minecraft.getMinecraft().gameSettings.setOptionFloatValue(GameSettings.Options.GAMMA, 1000);
+ break;
default:
ChatTransmitter.addToQueue(new ChatComponentText("ain't gonna find much anything here"));
ChatTransmitter.addToQueue(new ChatComponentText("§eDungeons Guide §7:: §e/dg loadrooms §7-§f Reloads dungeon roomdata."));