Fix a check
This commit is contained in:
		| @@ -18,6 +18,7 @@ import java.net.URL; | |||||||
| import java.net.URLEncoder; | import java.net.URLEncoder; | ||||||
| import java.nio.file.Files; | import java.nio.file.Files; | ||||||
| import java.util.AbstractMap.SimpleEntry; | import java.util.AbstractMap.SimpleEntry; | ||||||
|  | import java.util.ArrayList; | ||||||
| import java.util.Collections; | import java.util.Collections; | ||||||
| import java.util.LinkedList; | import java.util.LinkedList; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| @@ -179,12 +180,19 @@ public class LDUploadLogs implements LDCommand { | |||||||
|                         String disguiseText = new String(Files.readAllBytes(disguises.toPath())); |                         String disguiseText = new String(Files.readAllBytes(disguises.toPath())); | ||||||
|                         StringBuilder configText = new StringBuilder(new String(Files.readAllBytes(config.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); |                             configText.append("\n").append(s); | ||||||
|                         } |                         } | ||||||
|  |  | ||||||
|  |                         if (modified.isEmpty()) { | ||||||
|  |                             configText.append("\nUsing default config!"); | ||||||
|  |                         } | ||||||
|  |  | ||||||
|                         URL latestPaste = new GuestPaste("latest.log", latestText).paste(); |                         URL latestPaste = new GuestPaste("latest.log", latestText).paste(); | ||||||
|                         URL configPaste = new GuestPaste("LibsDisguises config.yml", configText.toString()).paste(); |                         URL configPaste = new GuestPaste("LibsDisguises config.yml", configText.toString()).paste(); | ||||||
|                         URL disguisesPaste = new GuestPaste("LibsDisguises disguises.yml", disguiseText).paste(); |                         URL disguisesPaste = new GuestPaste("LibsDisguises disguises.yml", disguiseText).paste(); | ||||||
|   | |||||||
| @@ -223,8 +223,8 @@ public class LibsPremium { | |||||||
|                 DisguiseUtilities.getLogger().info("Registered to: " + getSanitizedUser(plugin.getUserID())); |                 DisguiseUtilities.getLogger().info("Registered to: " + getSanitizedUser(plugin.getUserID())); | ||||||
|  |  | ||||||
|                 // >.> |                 // >.> | ||||||
|                 if (plugin.getBuildNumber() == null || !plugin.getBuildNumber().matches("[0-9]+") || |                 if (plugin.getBuildNumber() == null || !plugin.getBuildNumber().matches("#[0-9]+") || | ||||||
|                         Integer.parseInt(plugin.getBuildNumber()) < 300) { |                         Integer.parseInt(plugin.getBuildNumber().substring(1)) < 300) { | ||||||
|                     file.delete(); |                     file.delete(); | ||||||
|                     continue; |                     continue; | ||||||
|                 } |                 } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user