Fix a check

This commit is contained in:
libraryaddict 2020-07-21 09:51:47 +12:00
parent ea50632925
commit e73992b8ed
2 changed files with 12 additions and 4 deletions

View File

@ -18,6 +18,7 @@ import java.net.URL;
import java.net.URLEncoder;
import java.nio.file.Files;
import java.util.AbstractMap.SimpleEntry;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
@ -179,12 +180,19 @@ public class LDUploadLogs implements LDCommand {
String disguiseText = new String(Files.readAllBytes(disguises.toPath()));
StringBuilder configText = new StringBuilder(new String(Files.readAllBytes(config.toPath())));
configText.append("\n\n");
configText.append("\n================\n");
for (String s : DisguiseConfig.doOutput(LibsDisguises.getInstance().getConfig(), true, true)) {
ArrayList<String> modified = DisguiseConfig
.doOutput(LibsDisguises.getInstance().getConfig(), true, true);
for (String s : modified) {
configText.append("\n").append(s);
}
if (modified.isEmpty()) {
configText.append("\nUsing default config!");
}
URL latestPaste = new GuestPaste("latest.log", latestText).paste();
URL configPaste = new GuestPaste("LibsDisguises config.yml", configText.toString()).paste();
URL disguisesPaste = new GuestPaste("LibsDisguises disguises.yml", disguiseText).paste();

View File

@ -223,8 +223,8 @@ public class LibsPremium {
DisguiseUtilities.getLogger().info("Registered to: " + getSanitizedUser(plugin.getUserID()));
// >.>
if (plugin.getBuildNumber() == null || !plugin.getBuildNumber().matches("[0-9]+") ||
Integer.parseInt(plugin.getBuildNumber()) < 300) {
if (plugin.getBuildNumber() == null || !plugin.getBuildNumber().matches("#[0-9]+") ||
Integer.parseInt(plugin.getBuildNumber().substring(1)) < 300) {
file.delete();
continue;
}