aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/commands')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/commands/CommandEditRoom.java79
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/commands/CommandToggleDebug.java28
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/commands/CommandWhatYearIsIt.java40
3 files changed, 0 insertions, 147 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandEditRoom.java b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandEditRoom.java
deleted file mode 100644
index 18f37b09..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandEditRoom.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package kr.syeyoung.dungeonsguide.commands;
-
-import kr.syeyoung.dungeonsguide.DungeonsGuide;
-import kr.syeyoung.dungeonsguide.SkyblockStatus;
-import kr.syeyoung.dungeonsguide.dungeon.DungeonContext;
-import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
-import kr.syeyoung.dungeonsguide.roomedit.EditingContext;
-import kr.syeyoung.dungeonsguide.roomedit.gui.GuiDungeonRoomEdit;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.entity.EntityPlayerSP;
-import net.minecraft.command.CommandBase;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.util.ChatComponentText;
-import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
-import net.minecraftforge.fml.common.gameevent.TickEvent;
-import net.minecraftforge.fml.relauncher.Side;
-
-import java.awt.*;
-
-public class CommandEditRoom extends CommandBase {
- @Override
- public String getCommandName() {
- return "editsession";
- }
-
- @Override
- public String getCommandUsage(ICommandSender sender) {
- return "editsession";
- }
-
- @Override
- public void processCommand(ICommandSender sender, String[] args) {
- SkyblockStatus skyblockStatus = (SkyblockStatus) DungeonsGuide.getDungeonsGuide().getSkyblockStatus();
- if (!skyblockStatus.isOnDungeon()) {
- sender.addChatMessage(new ChatComponentText("You're not in dungeons"));
- return;
- }
-
- if (skyblockStatus.getContext() == null) {
- sender.addChatMessage(new ChatComponentText("Dungeon Context is null"));
- return;
- }
-
-
- DungeonContext context = skyblockStatus.getContext();
- EntityPlayerSP thePlayer = Minecraft.getMinecraft().thePlayer;
- Point roomPt = context.getMapProcessor().worldPointToRoomPoint(thePlayer.getPosition());
- DungeonRoom dungeonRoom = context.getRoomMapper().get(roomPt);
-
- if (dungeonRoom == null) {
- sender.addChatMessage(new ChatComponentText("Can't determine the dungeon room you're in"));
- return;
- }
-
- if (EditingContext.getEditingContext() != null) {
- sender.addChatMessage(new ChatComponentText("There is an editing session currently open."));
- return;
- }
-
- EditingContext.createEditingContext(dungeonRoom);
- openGuiReq = true;
- }
-
- private boolean openGuiReq = false;
-
- @SubscribeEvent
- public void tick(TickEvent.ClientTickEvent tick){
- if ( openGuiReq &&tick.phase == TickEvent.Phase.END && tick.side == Side.CLIENT && tick.type == TickEvent.Type.CLIENT) {
- DungeonRoom dr = EditingContext.getEditingContext().getRoom();
- EditingContext.getEditingContext().openGui(new GuiDungeonRoomEdit(dr));
- openGuiReq = false;
- }
- }
-
- @Override
- public int getRequiredPermissionLevel() {
- return 0;
- }
-}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandToggleDebug.java b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandToggleDebug.java
deleted file mode 100644
index cf1ff459..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandToggleDebug.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package kr.syeyoung.dungeonsguide.commands;
-
-import kr.syeyoung.dungeonsguide.DungeonsGuide;
-import net.minecraft.command.CommandBase;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.util.ChatComponentText;
-
-public class CommandToggleDebug extends CommandBase {
- @Override
- public String getCommandName() {
- return "debugtoggle";
- }
-
- @Override
- public String getCommandUsage(ICommandSender sender) {
- return "debugtoggle";
- }
-
- @Override
- public void processCommand(ICommandSender sender, String[] args) {
- DungeonsGuide.DEBUG = !DungeonsGuide.DEBUG;
- sender.addChatMessage(new ChatComponentText("Toggled Debug mode to "+ DungeonsGuide.DEBUG));
- }
- @Override
- public int getRequiredPermissionLevel() {
- return 0;
- }
-}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandWhatYearIsIt.java b/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandWhatYearIsIt.java
deleted file mode 100644
index d5da1c7f..00000000
--- a/src/main/java/kr/syeyoung/dungeonsguide/commands/CommandWhatYearIsIt.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package kr.syeyoung.dungeonsguide.commands;
-
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
-import kr.syeyoung.dungeonsguide.utils.SkyblockUtils;
-import net.minecraft.command.CommandBase;
-import net.minecraft.command.ICommandSender;
-import net.minecraft.util.ChatComponentText;
-
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-public class CommandWhatYearIsIt extends CommandBase {
- @Override
- public String getCommandName() {
- return "tellmeyear";
- }
-
- @Override
- public String getCommandUsage(ICommandSender sender) {
- return "tellmeyear";
- }
-
- @Override
- public void processCommand(ICommandSender sender, String[] args) {
- try {
-
-
-
- sender.addChatMessage(new ChatComponentText("Current year is "+ SkyblockUtils.getSkyblockYear()));
- } catch (Throwable throwable) {
- throwable.printStackTrace();
- }
- }
- @Override
- public int getRequiredPermissionLevel() {
- return 0;
- }
-}