Add small note to config yml & corrected a check
This commit is contained in:
		| @@ -56,9 +56,8 @@ public class LibsDisguises extends JavaPlugin { | ||||
|         LibsPremium.check(getDescription().getVersion(), getFile()); | ||||
|  | ||||
|         if (!LibsPremium.isPremium()) { | ||||
|             getLogger() | ||||
|                     .info("You are running the free version, commands limited to non-players (Console, Command " + | ||||
|                             "Blocks)"); | ||||
|             getLogger().info("You are running the free version, commands limited to non-players (Console, Command " + | ||||
|                     "Blocks)"); | ||||
|         } | ||||
|  | ||||
|         if (!ReflectionManager.getMinecraftVersion().startsWith("1.14.4")) { | ||||
| @@ -242,8 +241,7 @@ public class LibsDisguises extends JavaPlugin { | ||||
|  | ||||
|             // Invalidate invalid distribution | ||||
|             if (LibsPremium.isPremium() && LibsPremium.getPaidInformation() != null && | ||||
|                     (!LibsPremium.getPaidInformation().isLegit() || | ||||
|                             LibsPremium.getPaidInformation().getDownloadID().equals("-1895736039"))) { | ||||
|                     !LibsPremium.getPaidInformation().isLegit()) { | ||||
|                 throw new IllegalStateException( | ||||
|                         "Error while checking pi rate on startup! Please re-download the jar from SpigotMC before " + | ||||
|                                 "reporting this error!"); | ||||
|   | ||||
| @@ -11,6 +11,8 @@ import java.io.File; | ||||
| import java.io.IOException; | ||||
| import java.net.URL; | ||||
| import java.net.URLClassLoader; | ||||
| import java.util.Date; | ||||
| import java.util.concurrent.TimeUnit; | ||||
|  | ||||
| /** | ||||
|  * Created by libraryaddict on 2/06/2017. | ||||
| @@ -194,7 +196,11 @@ public class LibsPremium { | ||||
|  | ||||
|             if (plugin.isPremium()) { | ||||
|                 if (!isValidVersion(version, plugin.getVersion()) || plugin.getUserID() == null || | ||||
|                         plugin.getDownloadID() == null) { | ||||
|                         plugin.getDownloadID() == null || plugin.getUserID().equals("666666") || | ||||
|                         plugin.getParsedBuildDate().before(getPluginInformation().getParsedBuildDate()) || | ||||
|                         plugin.getParsedBuildDate().after(new Date( | ||||
|                                 getPluginInformation().getParsedBuildDate().getTime() + | ||||
|                                         TimeUnit.DAYS.toMillis(365 * 2)))) { | ||||
|                     DisguiseUtilities.getLogger().warning( | ||||
|                             "You have an old Lib's Disguises jar (" + file.getName() + " " + fileInfo + | ||||
|                                     ") in the LibsDisguises folder! For security purposes, please replace this with a" + | ||||
|   | ||||
| @@ -2,6 +2,9 @@ package me.libraryaddict.disguise.utilities.plugin; | ||||
|  | ||||
| import me.libraryaddict.disguise.utilities.LibsPremium; | ||||
|  | ||||
| import java.text.SimpleDateFormat; | ||||
| import java.util.Date; | ||||
|  | ||||
| /** | ||||
|  * Created by libraryaddict on 20/06/2019. | ||||
|  */ | ||||
| @@ -53,6 +56,16 @@ public class PluginInformation { | ||||
|         return buildDate; | ||||
|     } | ||||
|  | ||||
|     public Date getParsedBuildDate() { | ||||
|         try { | ||||
|             return new SimpleDateFormat("dd/MM/yyyy HH:mm").parse(getBuildDate()); | ||||
|         } | ||||
|         catch (Exception ex) { | ||||
|         } | ||||
|  | ||||
|         return null; | ||||
|     } | ||||
|  | ||||
|     public boolean isLegit() { | ||||
|         return getUserID().matches("[0-9]+") && getResourceID().equals("32453") && getDownloadID().matches("-?[0-9]+"); | ||||
|     } | ||||
|   | ||||
| @@ -16,6 +16,7 @@ Permissions: | ||||
|  | ||||
| # Disables commands with the exception of /libsdisguises. Useful if you don't want the plugin to be used by anything | ||||
| #  but a plugin | ||||
| # Useful if you didn't purchase the plugin. | ||||
| DisableCommands: false | ||||
|  | ||||
| # The disguise plugin stores all GameProfiles inside a folder called "GameProfiles" as a local cache | ||||
|   | ||||
		Reference in New Issue
	
	Block a user