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>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
|
||||||
<asm.version>9.0</asm.version>
|
<asm.version>9.0</asm.version>
|
||||||
<lombok.version>1.18.16</lombok.version>
|
<lombok.version>1.18.20</lombok.version>
|
||||||
<protocollib.version>4.7.0-SNAPSHOT</protocollib.version>
|
<protocollib.version>4.7.0</protocollib.version>
|
||||||
<spigot.version>[1.17,]</spigot.version>
|
<spigot.version>[1.17,]</spigot.version>
|
||||||
<junit.version>4.13.1</junit.version>
|
<junit.version>4.13.1</junit.version>
|
||||||
<paper-api.version>[1.16,]</paper-api.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");
|
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) {
|
if (commandVisibility == null) {
|
||||||
DisguiseUtilities.getLogger()
|
DisguiseUtilities.getLogger()
|
||||||
|
@ -51,20 +51,24 @@ public class ClassGetter {
|
|||||||
|
|
||||||
// Get a File object for the package
|
// Get a File object for the package
|
||||||
CodeSource src = runFrom.getProtectionDomain().getCodeSource();
|
CodeSource src = runFrom.getProtectionDomain().getCodeSource();
|
||||||
|
|
||||||
if (src != null) {
|
if (src != null) {
|
||||||
URL resource = src.getLocation();
|
URL resource = src.getLocation();
|
||||||
|
boolean isInsideJar = resource.getPath().toLowerCase(Locale.ENGLISH).contains(".jar!") && resource.getPath().toLowerCase(Locale.ENGLISH).endsWith(".class");
|
||||||
if (resource.getPath().toLowerCase(Locale.ENGLISH).endsWith(".jar")) {
|
if (resource.getPath().toLowerCase(Locale.ENGLISH).endsWith(".jar") || isInsideJar) {
|
||||||
processJarfile(resource, pkgname, classes);
|
processJarfile(resource, pkgname, classes);
|
||||||
} else {
|
} 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("$")) {
|
if (f.getName().contains("$")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
classes.add(pkgname + "/" + f.getName());
|
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