aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/io
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/io')
-rw-r--r--src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/SimpleDevCommands.kt10
-rw-r--r--src/main/kotlin/io/github/moulberry/notenoughupdates/commands/help/StorageViewerWhyCommand.kt48
2 files changed, 4 insertions, 54 deletions
diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/SimpleDevCommands.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/SimpleDevCommands.kt
index 95a6500e..5d2f156f 100644
--- a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/SimpleDevCommands.kt
+++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/SimpleDevCommands.kt
@@ -30,10 +30,8 @@ import io.github.moulberry.notenoughupdates.util.brigadier.*
import net.minecraft.client.entity.EntityPlayerSP
import net.minecraft.event.ClickEvent
import net.minecraft.util.BlockPos
-import net.minecraft.util.ChatComponentText
import net.minecraft.util.ResourceLocation
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-import java.util.function.Consumer
@NEUAutoSubscribe
class SimpleDevCommands {
@@ -56,11 +54,11 @@ class SimpleDevCommands {
}.withHelp("Display the dungeon win pop up")
event.command("neuenablestorage") {
thenLiteralExecute("disable") {
- NotEnoughUpdates.INSTANCE.config.storageGUI.enableStorageGUI3 = true
+ NotEnoughUpdates.INSTANCE.config.storageGUI.enableStorageGUI3 = false
NotEnoughUpdates.INSTANCE.saveConfig()
reply("Disabled the NEU storage overlay. Click here to enable again") {
chatStyle.chatClickEvent = ClickEvent(
- ClickEvent.Action.SUGGEST_COMMAND,
+ ClickEvent.Action.RUN_COMMAND,
"/neuenablestorage"
)
}
@@ -70,7 +68,7 @@ class SimpleDevCommands {
NotEnoughUpdates.INSTANCE.saveConfig()
reply("Enabled the NEU storage overlay. Click here to disable again") {
chatStyle.chatClickEvent = ClickEvent(
- ClickEvent.Action.SUGGEST_COMMAND,
+ ClickEvent.Action.RUN_COMMAND,
"/neuenablestorage disable"
)
}
@@ -101,7 +99,7 @@ class SimpleDevCommands {
thenExecute {
NotEnoughUpdates.INSTANCE.manager
.userFacingRepositoryReload()
- .thenAccept { it
+ .thenAccept {
it.forEach(::reply)
}
}
diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/help/StorageViewerWhyCommand.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/help/StorageViewerWhyCommand.kt
deleted file mode 100644
index 782eaf3d..00000000
--- a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/help/StorageViewerWhyCommand.kt
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2023 NotEnoughUpdates contributors
- *
- * This file is part of NotEnoughUpdates.
- *
- * NotEnoughUpdates is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation, either
- * version 3 of the License, or (at your option) any later version.
- *
- * NotEnoughUpdates is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with NotEnoughUpdates. If not, see <https://www.gnu.org/licenses/>.
- */
-package io.github.moulberry.notenoughupdates.commands.help
-
-import io.github.moulberry.notenoughupdates.autosubscribe.NEUAutoSubscribe
-import io.github.moulberry.notenoughupdates.events.RegisterBrigadierCommandEvent
-import io.github.moulberry.notenoughupdates.util.NotificationHandler
-import io.github.moulberry.notenoughupdates.util.brigadier.thenExecute
-import io.github.moulberry.notenoughupdates.util.brigadier.withHelp
-import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-
-@NEUAutoSubscribe
-class StorageViewerWhyCommand {
- @SubscribeEvent
- fun onCommands(event: RegisterBrigadierCommandEvent) {
- event.command("neustwhy") {
- thenExecute {
- NotificationHandler.displayNotification(
- listOf(
- "§eStorage Viewer",
- "§7Currently, the storage viewer requires you to click twice",
- "§7in order to switch between pages. This is because Hypixel",
- "§7has not yet added a shortcut command to go to any enderchest/",
- "§7storage page.",
- "§7While it is possible to send the second click",
- "§7automatically, doing so violates Hypixel's new mod rules."
- ), true
- )
- }
- }.withHelp("Display information about why you have to click twice in the NEU storage overlay")
- }
-}