Merge pull request #624 from buepas/master
Fix issue related to launch-wrapping
This commit is contained in:
commit
27bff9e613
4
pom.xml
4
pom.xml
@ -96,8 +96,8 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
<asm.version>9.0</asm.version>
|
||||
<lombok.version>1.18.16</lombok.version>
|
||||
<protocollib.version>4.7.0-SNAPSHOT</protocollib.version>
|
||||
<lombok.version>1.18.20</lombok.version>
|
||||
<protocollib.version>4.7.0</protocollib.version>
|
||||
<spigot.version>[1.17,]</spigot.version>
|
||||
<junit.version>4.13.1</junit.version>
|
||||
<paper-api.version>[1.16,]</paper-api.version>
|
||||
|
@ -687,7 +687,8 @@ public class DisguiseConfig {
|
||||
DisguiseUtilities.getLogger().warning("Cannot parse '" + config.getString("UpdatesBranch") + "' to a valid option for UpdatesBranch");
|
||||
}
|
||||
|
||||
PermissionDefault commandVisibility = PermissionDefault.getByName(config.getString("Permissions.SeeCommands"));
|
||||
String seeCommands = config.getString("Permissions.SeeCommands");
|
||||
PermissionDefault commandVisibility = seeCommands == null ? null : PermissionDefault.getByName(seeCommands);
|
||||
|
||||
if (commandVisibility == null) {
|
||||
DisguiseUtilities.getLogger()
|
||||
|
@ -51,20 +51,24 @@ public class ClassGetter {
|
||||
|
||||
// Get a File object for the package
|
||||
CodeSource src = runFrom.getProtectionDomain().getCodeSource();
|
||||
|
||||
if (src != null) {
|
||||
URL resource = src.getLocation();
|
||||
|
||||
if (resource.getPath().toLowerCase(Locale.ENGLISH).endsWith(".jar")) {
|
||||
boolean isInsideJar = resource.getPath().toLowerCase(Locale.ENGLISH).contains(".jar!") && resource.getPath().toLowerCase(Locale.ENGLISH).endsWith(".class");
|
||||
if (resource.getPath().toLowerCase(Locale.ENGLISH).endsWith(".jar") || isInsideJar) {
|
||||
processJarfile(resource, pkgname, classes);
|
||||
} else {
|
||||
for (File f : new File(resource.getPath() + "/" + pkgname.replace(".", "/")).listFiles()) {
|
||||
File[] baseFileList = new File(resource.getPath() + "/" + pkgname.replace(".", "/")).listFiles();
|
||||
if (baseFileList != null) {
|
||||
for (File f : baseFileList){
|
||||
if (f.getName().contains("$")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
classes.add(pkgname + "/" + f.getName());
|
||||
}
|
||||
} else {
|
||||
System.out.println("File not found for: " + resource.getPath() + "/" + pkgname.replace(".", "/"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user