aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2022-04-12 16:23:58 +0000
committerGitHub <noreply@github.com>2022-04-12 18:23:58 +0200
commit0f7fb90f9a757117584daf37b6eba8b37add1518 (patch)
tree17a9b373dc1b764eba783869b42058b23faae4ef /src/main
parent6f3ed710839922a3637a5afda2e8758dff594b77 (diff)
downloadNotEnoughUpdates-0f7fb90f9a757117584daf37b6eba8b37add1518.tar.gz
NotEnoughUpdates-0f7fb90f9a757117584daf37b6eba8b37add1518.tar.bz2
NotEnoughUpdates-0f7fb90f9a757117584daf37b6eba8b37add1518.zip
Added an command to change repo url and commits url (#109)
* Added an command to change repo url and commits url * Added new armor types to itemlist category * made /neurepomode setRepoURL not a pain to use Co-authored-by: jani270 <jani270@gmx.de>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java7
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/repo/RepoModeCommand.java32
2 files changed, 34 insertions, 5 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
index b7aa42d6..75bff803 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
@@ -1390,7 +1390,12 @@ public class NEUOverlay extends Gui {
"DUNGEON HELMET",
"DUNGEON CHESTPLATE",
"DUNGEON LEGGINGS",
- "DUNGEON BOOTS"
+ "DUNGEON BOOTS",
+ "BELT",
+ "GLOVES",
+ "CLOAK",
+ "NECKLACE",
+ "BRACELET"
) >= 0;
} else if (getSortMode() == SORT_MODE_ACCESSORY) {
return checkItemType(item.get("lore").getAsJsonArray(), "ACCESSORY", "HATCCESSORY", "DUNGEON ACCESSORY") >= 0;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/RepoModeCommand.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/RepoModeCommand.java
index bb6e1675..a8f53460 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/RepoModeCommand.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/repo/RepoModeCommand.java
@@ -15,9 +15,33 @@ public class RepoModeCommand extends ClientCommandBase {
@Override
public void processCommand(ICommandSender sender, String[] args) throws CommandException {
- NotEnoughUpdates.INSTANCE.config.hidden.dev = !NotEnoughUpdates.INSTANCE.config.hidden.dev;
- NotEnoughUpdates.INSTANCE.config.hidden.enableItemEditing =
- !NotEnoughUpdates.INSTANCE.config.hidden.enableItemEditing;
- Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("\u00a75Toggled NEU repo dev mode."));
+ if (args.length == 1 && args[0].equalsIgnoreCase("toggle")) {
+ NotEnoughUpdates.INSTANCE.config.hidden.dev = !NotEnoughUpdates.INSTANCE.config.hidden.dev;
+ NotEnoughUpdates.INSTANCE.config.hidden.enableItemEditing =
+ !NotEnoughUpdates.INSTANCE.config.hidden.enableItemEditing;
+ Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("\u00a75Toggled NEU repo dev mode."));
+ } else if (args.length >= 2 && args[0].equalsIgnoreCase("setrepourl")) {
+ String githubUser = "Moulberry";
+ String githubRepo = "NotEnoughUpdates-REPO";
+ String githubBranch = "master";
+ if (!args[1].equalsIgnoreCase("reset")) {
+ githubUser = args[1];
+ if (args.length >= 3) {
+ githubRepo = args[2];
+ }
+ if (args.length >= 4) {
+ githubBranch = args[3];
+ }
+ }
+ NotEnoughUpdates.INSTANCE.config.hidden.repoURL = "https://github.com/" + githubUser + "/" + githubRepo + "/archive/" + githubBranch + ".zip";
+ NotEnoughUpdates.INSTANCE.config.hidden.repoCommitsURL = "https://api.github.com/repos/" + githubUser + "/" + githubRepo + "/commits/" + githubBranch;
+ Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("\u00a75Set NEU repo URL to " + NotEnoughUpdates.INSTANCE.config.hidden.repoURL +
+ "\n\u00a75Set NEU repo commits URL to " + NotEnoughUpdates.INSTANCE.config.hidden.repoCommitsURL));
+
+ } else {
+ Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("\u00a7cUsage:" +
+ "\n\u00a75/neurepomode <toggle> Toggles on/off dev mode and item editing." +
+ "\n\u00a75/neurepomode <setRepoURL> <githubuser> [reponame] [branch] Sets the repo URL for downloading from."));
+ }
}
}