Skip to content

Commit

Permalink
better resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBkiNN committed Jun 1, 2024
1 parent 58aa986 commit d4174bf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion .idea/material_theme_project_new.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=xyz.bobkinn
mod_version=1.0.0
mod_version=1.0.1
mod_id = ignite_fixer

mc_version = 1.20.6-R0.1-SNAPSHOT
Expand Down
17 changes: 7 additions & 10 deletions src/main/java/xyz/bobkinn/ignite_fixer/mixin/ReobfServerMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,17 @@
@Mixin(targets = "io.papermc.paper.pluginremap.ReobfServer")
public class ReobfServerMixin {

@Unique
private static @NotNull Path ignite_fixer$fixPath(String file){
return Path.of(file).toAbsolutePath();
}

@Unique
private static @NotNull Path ignite_fixer$findPath(){
var pJar = System.getProperty("ignite.paper.jar");
var jar = System.getProperty("ignite.jar");
if (pJar != null){
return ignite_fixer$fixPath(pJar);
}
if (jar != null){
return ignite_fixer$fixPath(jar);
for (var name : new String[]{pJar, jar, "server.jar", "paper.jar"}){
if (name != null){
var f = Path.of(name).toAbsolutePath();
if (f.toFile().isFile()){
return f;
}
}
}
throw new IllegalArgumentException("Failed to find server jar file");
}
Expand Down

0 comments on commit d4174bf

Please sign in to comment.