Skip to content

Commit

Permalink
Fix isFML check (#404)
Browse files Browse the repository at this point in the history
* Fix isFML check

Signed-off-by: Jocelyn Castellano <[email protected]>

* Swap order of if params

---------

Signed-off-by: Jocelyn Castellano <[email protected]>
Co-authored-by: My-Name-Is-Jeff <[email protected]>
  • Loading branch information
pandaninjas and My-Name-Is-Jeff authored Aug 5, 2023
1 parent 42bf84d commit c6f205c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public class SkytilsTweaker extends EssentialSetupTweaker {

public SkytilsTweaker() throws Throwable {
runStage("gg.skytils.skytilsmod.utils.SuperSecretSettings", "load");
boolean isFML = System.getSecurityManager().getClass().equals(FMLSecurityManager.class);
if (System.getProperty("skytils.noSecurityManager") == null && (isFML || System.getSecurityManager().getClass() == SecurityManager.class || System.getSecurityManager() == null)) {
boolean isFML = System.getSecurityManager() != null && System.getSecurityManager().getClass().equals(FMLSecurityManager.class);
if (System.getProperty("skytils.noSecurityManager") == null && (System.getSecurityManager() == null || isFML || System.getSecurityManager().getClass() == SecurityManager.class)) {
System.out.println("Skytils is setting the security manager to prevent 'ghost windows'... Set the flag skytils.noSecurityManager to prevent this behavior.");
overrideSecurityManager(isFML);
runStage("gg.skytils.skytilsmod.tweaker.SkytilsSecurityManager", "overrideSecurityManager", isFML);
Expand Down

0 comments on commit c6f205c

Please sign in to comment.