diff options
| author | Moulberry <jjenour@student.unimelb.edu.au> | 2021-07-26 01:36:28 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-26 01:36:28 +0800 |
| commit | c9975b9c20161c929e2c29640eab767f97df4105 (patch) | |
| tree | a8e4a0c84dc559be1925b230dc719423dd2a5ff1 /src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java | |
| parent | 0f48092ef19488a43114478095f1d4a2040d369c (diff) | |
| parent | a7dde6d4582ad1b2474b0f59c1c74dd70b654a98 (diff) | |
| download | notenoughupdates-c9975b9c20161c929e2c29640eab767f97df4105.tar.gz notenoughupdates-c9975b9c20161c929e2c29640eab767f97df4105.tar.bz2 notenoughupdates-c9975b9c20161c929e2c29640eab767f97df4105.zip | |
Merge pull request #213 from IRONM00N/pr
Misc. Improvements now without formatting or conflicts
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java index 181b9225..967ef903 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java @@ -3,8 +3,6 @@ package io.github.moulberry.notenoughupdates; import com.google.common.collect.Lists; import com.google.gson.*; import io.github.moulberry.notenoughupdates.auction.APIManager; -import io.github.moulberry.notenoughupdates.miscfeatures.StorageManager; -import io.github.moulberry.notenoughupdates.miscgui.GuiItemCustomize; import io.github.moulberry.notenoughupdates.miscgui.GuiItemRecipe; import io.github.moulberry.notenoughupdates.util.Constants; import io.github.moulberry.notenoughupdates.util.HypixelApi; @@ -66,7 +64,7 @@ public class NEUManager { private ExecutorService repoLoaderES = Executors.newSingleThreadExecutor(); - private static final String GIT_COMMITS_URL = "https://api.github.com/repos/Moulberry/NotEnoughUpdates-REPO/commits/master"; + private static String GIT_COMMITS_URL; private HashMap<String, Set<String>> usagesMap = new HashMap<>(); @@ -80,6 +78,7 @@ public class NEUManager { this.neu = neu; this.configLocation = configLocation; this.auctionManager = new APIManager(this); + GIT_COMMITS_URL = neu.config.hidden.repoCommitsURL; gson = new GsonBuilder().setPrettyPrinting().create(); @@ -188,8 +187,8 @@ public class NEUManager { Utils.recursiveDelete(repoLocation); repoLocation.mkdirs(); - //TODO: Store hard-coded value somewhere else - String dlUrl = "https://github.com/Moulberry/NotEnoughUpdates-REPO/archive/master.zip"; + + String dlUrl = neu.config.hidden.repoURL; pane.setMessage("Downloading NEU Master Archive. (DL# >20)"); dialog.pack(); @@ -1169,32 +1168,6 @@ public class NEUManager { return true; } - public boolean uploadItemJson(String internalname, String itemid, String displayname, String[] lore, String crafttext, String infoType, String[] info, - String clickcommand, int damage, NBTTagCompound nbttag) { - JsonObject json = createItemJson(internalname, itemid, displayname, lore, crafttext, infoType, info, clickcommand, damage, nbttag); - if(json == null) { - return false; - } - - String username = Minecraft.getMinecraft().thePlayer.getName(); - String newBranchName = UUID.randomUUID().toString().substring(0, 8) + "-" + internalname + "-" + username; - String prTitle = internalname + "-" + username; - String prBody = "Internal name: " + internalname + "\nSubmitted by: " + username; - String file = "items/"+internalname+".json"; - /*if(!neuio.createNewRequest(newBranchName, prTitle, prBody, file, gson.toJson(json))) { - return false; - }*/ - - try { - writeJsonDefaultDir(json, internalname+".json"); - } catch(IOException e) { - return false; - } - - loadItem(internalname); - return true; - } - public void writeJson(JsonObject json, File file) throws IOException { file.createNewFile(); |
