aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2023-06-28 06:26:38 +1000
committerGitHub <noreply@github.com>2023-06-27 16:26:38 -0400
commit5c863511cabc4e1bb3b1bfcfbadabf9fd6d4dd41 (patch)
tree4de58e670986d8b87d881f85e101e1054c281460
parent1873fa0d2f71ef06ba24c89e6ccb6eb85f525ef3 (diff)
downloadNotEnoughUpdates-5c863511cabc4e1bb3b1bfcfbadabf9fd6d4dd41.tar.gz
NotEnoughUpdates-5c863511cabc4e1bb3b1bfcfbadabf9fd6d4dd41.tar.bz2
NotEnoughUpdates-5c863511cabc4e1bb3b1bfcfbadabf9fd6d4dd41.zip
Changes that happened in alpha 17 (#744)
* made Display donation status false * Added a command to set api key
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java2
-rw-r--r--src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/SetKeyCommand.kt43
-rw-r--r--src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/IQTest.kt2
3 files changed, 45 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java
index e24800be..a3e0adb5 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java
@@ -109,7 +109,7 @@ public class TooltipTweaks {
)
@ConfigEditorBoolean
@ConfigAccordionId(id = 0)
- public boolean museumDonationStatus = true;
+ public boolean museumDonationStatus = false;
@Expose
@ConfigOption(
diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/SetKeyCommand.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/SetKeyCommand.kt
new file mode 100644
index 00000000..1a0ccbf5
--- /dev/null
+++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/SetKeyCommand.kt
@@ -0,0 +1,43 @@
+/*
+ * 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.misc
+
+import com.mojang.brigadier.arguments.StringArgumentType.string
+import io.github.moulberry.notenoughupdates.NotEnoughUpdates
+import io.github.moulberry.notenoughupdates.autosubscribe.NEUAutoSubscribe
+import io.github.moulberry.notenoughupdates.events.RegisterBrigadierCommandEvent
+import io.github.moulberry.notenoughupdates.util.brigadier.*
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+
+@NEUAutoSubscribe
+class SetKeyCommand {
+ @SubscribeEvent
+ fun onCommands(event: RegisterBrigadierCommandEvent) {
+ event.command("neusetkey") {
+ thenArgument("key", string()) { key ->
+ thenExecute {
+ NotEnoughUpdates.INSTANCE.config.apiData.apiKey = this[key]
+ reply("Set your key to ${this[key]}")
+
+ }
+ }.withHelp("Set your API key found at https://developer.hypixel.net/")
+ }
+ }
+}
diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/IQTest.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/IQTest.kt
index 157050b3..c06335b1 100644
--- a/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/IQTest.kt
+++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/IQTest.kt
@@ -66,7 +66,7 @@ object IQTest {
val answerOption = ProcessedOption(
"IQ Test Question",
- "Please type out the answer to §a$question",
+ "Please type out the answer to §a$question\n§cIf you just want to set your api key do §6/neusetkey <key>",
-1,
javaClass.getField("answer"),
this,