aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java
diff options
context:
space:
mode:
authorRoman / Nea <roman.graef@gmail.com>2022-01-17 16:15:53 +0100
committerGitHub <noreply@github.com>2022-01-17 16:15:53 +0100
commit6107995ad7892807bf6ba098548754fea439cee4 (patch)
tree6cd2cdd24951bc432f4036e6ea1b9d664c8c6380 /src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java
parentc81b6a34ae7bbb70a11f23f49422f2fceffa689c (diff)
downloadnotenoughupdates-6107995ad7892807bf6ba098548754fea439cee4.tar.gz
notenoughupdates-6107995ad7892807bf6ba098548754fea439cee4.tar.bz2
notenoughupdates-6107995ad7892807bf6ba098548754fea439cee4.zip
Recipe Reloading should no longer duplicate recipes (#65)
* Remove potential RCE only exploitable by Moulberry himself, i still want my cape tho * no more recipe dupes
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java
index 37fe5f63..d3fd7e0c 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/Commands.java
@@ -362,16 +362,7 @@ public class Commands {
SimpleCommand reloadRepoCommand = new SimpleCommand("neureloadrepo", new SimpleCommand.ProcessCommandRunnable() {
public void processCommand(ICommandSender sender, String[] args) {
- File items = new File(NotEnoughUpdates.INSTANCE.manager.repoLocation, "items");
- if (items.exists()) {
- File[] itemFiles = new File(NotEnoughUpdates.INSTANCE.manager.repoLocation, "items").listFiles();
- if (itemFiles != null) {
- for (File f : itemFiles) {
- String internalname = f.getName().substring(0, f.getName().length() - 5);
- NotEnoughUpdates.INSTANCE.manager.loadItem(internalname);
- }
- }
- }
+ NotEnoughUpdates.INSTANCE.manager.reloadRepository();
Constants.reload();
NotEnoughUpdates.INSTANCE.newConfigFile();