Clean up some messages, warn about modded servers

This commit is contained in:
libraryaddict 2024-04-03 18:47:00 +13:00
parent 4be61e08d5
commit d24a6cedb9
2 changed files with 14 additions and 4 deletions

View File

@ -133,6 +133,16 @@ public class LibsDisguises extends JavaPlugin {
"plugin will continue to load, but it will look like a mugging victim");
}
// Note that Forge/Hybrid is unsupported
// Previously was supported but changes in both LD and nms has made it unsustainable
// The time and complexibility it would take is far too high for the amount of usage it would receive.
// Any extra income from sales would never cover the time spent implementing this.
if (Bukkit.getVersion().toLowerCase().matches(".*(arclight|mohist|magma).*")) {
getLogger().severe(
"Lib's Disguises will not work correctly on Forge/Hybrid servers, due to complexibility and time commitment there is " +
"no support for this. Do not report any issues to Lib's Disguises.");
}
commandConfig = new DisguiseCommandConfig();
if (!reloaded) {

View File

@ -305,25 +305,25 @@ public class LibsPremium {
if (info.getBuildNumber() == null || !info.getBuildNumber().matches("#\\d+")) {
f.delete();
DisguiseUtilities.getLogger().info("Ew, I don't recognize " + f.getName());
DisguiseUtilities.getLogger().info("Unknown file detected and deleted: LibsDisguises/" + f.getName());
continue;
} else if (Integer.parseInt(info.getBuildNumber().replace("#", "")) <
Integer.parseInt(LibsDisguises.getInstance().getBuildNo().replace("#", ""))) {
f.delete();
DisguiseUtilities.getLogger().info("Ew, " + f.getName() + " is so old");
DisguiseUtilities.getLogger().info("Outdated file deleted: LibsDisguises/" + f.getName());
continue;
}
if (!info.isLegit()) {
f.delete();
DisguiseUtilities.getLogger().info("Ew, I saw something nasty in " + f.getName());
DisguiseUtilities.getLogger().info("Potential virus was deleted: LibsDisguises/" + f.getName());
continue;
}
foundBetter = true;
break;
} catch (ClassNotFoundException | NoClassDefFoundError e) {
DisguiseUtilities.getLogger().info("Ew, error about invalid Libs Disguises jar. Deleting " + f.getName());
DisguiseUtilities.getLogger().info("Invalid Lib's Disguises jar has errored, deleting LibsDisguises/" + f.getName());
f.delete();
} catch (Throwable e) {
e.printStackTrace();