Some of my closed PRs (#172)
* update * fix * make duplicateModuleNames default False
This commit is contained in:
@@ -2,6 +2,8 @@ package anticope.rejects.utils;
|
||||
|
||||
import anticope.rejects.utils.seeds.Seeds;
|
||||
import meteordevelopment.meteorclient.MeteorClient;
|
||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||
import meteordevelopment.meteorclient.systems.modules.Modules;
|
||||
import meteordevelopment.meteorclient.utils.PostInit;
|
||||
public class RejectsUtils {
|
||||
|
||||
@@ -13,4 +15,15 @@ public class RejectsUtils {
|
||||
Seeds.get().save(MeteorClient.FOLDER);
|
||||
}));
|
||||
}
|
||||
|
||||
public static String getModuleName(String name) {
|
||||
int dupe = 0;
|
||||
for (Module module : Modules.get().getAll()) {
|
||||
if (module.name.equals(name)) {
|
||||
dupe++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return dupe == 0 ? name : getModuleName(name + "*".repeat(dupe));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user