aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/party
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-08-16 23:53:39 +0900
committersyeyoung <cyong06@naver.com>2021-08-16 23:53:39 +0900
commitcd88dae4b9c9c2204e554612e517d5b491e75c13 (patch)
treef2528e0045d9f67972f14492b54606b4265e5d5c /src/main/java/kr/syeyoung/dungeonsguide/party
parent3cc57a96a3ba4c512c006516fc9a8f5374f8198e (diff)
downloadSkyblock-Dungeons-Guide-cd88dae4b9c9c2204e554612e517d5b491e75c13.tar.gz
Skyblock-Dungeons-Guide-cd88dae4b9c9c2204e554612e517d5b491e75c13.tar.bz2
Skyblock-Dungeons-Guide-cd88dae4b9c9c2204e554612e517d5b491e75c13.zip
Ok great.
As you wanted, spamm logs are gone.
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/party')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java
index 7382f203..3ac637c9 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyManager.java
@@ -30,12 +30,17 @@ import kr.syeyoung.dungeonsguide.utils.TextUtils;
import lombok.Getter;
import lombok.Setter;
import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.GuiNewChat;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.Tuple;
import net.minecraftforge.client.event.ClientChatReceivedEvent;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.simple.SimpleLogger;
import org.json.JSONArray;
import org.json.JSONObject;
@@ -69,6 +74,18 @@ public class PartyManager implements StompMessageHandler {
@Setter
private int maxParty = 5;
+ private static final Logger logger = LogManager.getLogger();
+
+
+ private PartyManager() {
+ Logger l = LogManager.getLogger(GuiNewChat.class);
+ if (l instanceof SimpleLogger) {
+ ((SimpleLogger) l).setLevel(Level.OFF);
+ } else if (l instanceof org.apache.logging.log4j.core.Logger) {
+ ((org.apache.logging.log4j.core.Logger) l).setLevel(Level.OFF);
+ }
+ }
+
public void toggleAllowAskToJoin() {
if (canInvite) allowAskToJoin = !allowAskToJoin;
if (allowAskToJoin) {
@@ -131,6 +148,7 @@ public class PartyManager implements StompMessageHandler {
if (chatReceivedEvent.type == 2) return;
String str = chatReceivedEvent.message.getFormattedText();
+ logger.log(Level.INFO, "[CHAT] "+str);
try {
@@ -152,7 +170,6 @@ public class PartyManager implements StompMessageHandler {
members.add(player);
}
} else if (str.equals("§9§m-----------------------------§r")) {
- System.out.println(checkPlayer + " - "+partyJoin + " - "+invitedDash);
if ((checkPlayer > 0 || partyJoin > 0) && partyJoin != 100) {
chatReceivedEvent.setCanceled(true);
}