aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/commands
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-02-12 21:16:58 +0900
committersyeyoung <cyong06@naver.com>2021-02-12 21:16:58 +0900
commit77af3008dba9efab778555093191ecf8817e0ed3 (patch)
tree0440e57ff7eb6758ada65bf0fa7341d055f85ecb /src/main/java/kr/syeyoung/dungeonsguide/commands
parent5cac3f67b8d77bbf10b1c6cff1137f695a11f0f0 (diff)
downloadSkyblock-Dungeons-Guide-77af3008dba9efab778555093191ecf8817e0ed3.tar.gz
Skyblock-Dungeons-Guide-77af3008dba9efab778555093191ecf8817e0ed3.tar.bz2
Skyblock-Dungeons-Guide-77af3008dba9efab778555093191ecf8817e0ed3.zip
smol fix
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/commands')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java
index b2b730e0..58e256f2 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandDungeonsGuide.java
@@ -3,6 +3,7 @@ package kr.syeyoung.dungeonsguide.commands;
import com.google.gson.JsonObject;
import kr.syeyoung.dungeonsguide.config.guiconfig.GuiConfig;
import kr.syeyoung.dungeonsguide.dungeon.DungeonContext;
+import kr.syeyoung.dungeonsguide.dungeon.data.DungeonRoomInfo;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoomInfoRegistry;
import kr.syeyoung.dungeonsguide.e;
@@ -20,7 +21,7 @@ import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import java.awt.*;
-import java.io.IOException;
+import java.io.*;
import java.security.*;
import java.security.cert.CertificateException;
import java.text.SimpleDateFormat;
@@ -117,6 +118,36 @@ public class CommandDungeonsGuide extends CommandBase {
} catch (Throwable t) {
t.printStackTrace();
}
+ } else if (args[0].equals("process") && Minecraft.getMinecraft().getSession().getPlayerID().replace("-","").equals("e686fe0aab804a71ac7011dc8c2b534c")) {
+ File root = e.getDungeonsGuide().getConfigDir();
+ File dir = new File(root, "processorinput");
+ File outsecret = new File(root, "processoroutpuzzle");
+ File outpuzzle = new File(root, "processoroutsecret");
+ for (File f : dir.listFiles()) {
+ if (!f.getName().endsWith(".roomdata")) continue;
+ try {
+ InputStream fis = new FileInputStream(f);
+ ObjectInputStream ois = new ObjectInputStream(fis);
+ DungeonRoomInfo dri = (DungeonRoomInfo) ois.readObject();
+ ois.close();
+ fis.close();
+ dri.setUserMade(false);
+
+ FileOutputStream fos = new FileOutputStream(new File(outsecret, dri.getUuid().toString() + ".roomdata"));
+ ObjectOutputStream oos = new ObjectOutputStream(fos);
+ oos.writeObject(dri);
+ oos.flush();
+ oos.close();
+
+ dri.getMechanics().clear();
+
+ fos = new FileOutputStream(new File(outpuzzle, dri.getUuid().toString() + ".roomdata"));
+ oos = new ObjectOutputStream(fos);
+ oos.writeObject(dri);
+ oos.flush();
+ oos.close();
+ } catch (Exception e) {e.printStackTrace();}
+ }
} else {
sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg §7-§fOpens configuration gui"));
sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg gui §7-§fOpens configuration gui"));