net.minecraftforge.fml.common.event.FMLFingerprintViolationEvent Java Examples

The following examples show how to use net.minecraftforge.fml.common.event.FMLFingerprintViolationEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EnderUtilities.java    From enderutilities with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Mod.EventHandler
public void onFingerPrintViolation(FMLFingerprintViolationEvent event)
{
    // Not running in a dev environment
    if (event.isDirectory() == false)
    {
        logger.warn("*********************************************************************************************");
        logger.warn("*****                                    WARNING                                        *****");
        logger.warn("*****                                                                                   *****");
        logger.warn("*****   The signature of the mod file '{}' does not match the expected fingerprint!     *****", event.getSource().getName());
        logger.warn("*****   This might mean that the mod file has been tampered with!                       *****");
        logger.warn("*****   If you did not download the mod {} directly from Curse/CurseForge,       *****", Reference.MOD_NAME);
        logger.warn("*****   or using one of the well known launchers, and you did not                       *****");
        logger.warn("*****   modify the mod file at all yourself, then it's possible,                        *****");
        logger.warn("*****   that it may contain malware or other unwanted things!                           *****");
        logger.warn("*********************************************************************************************");
    }
}
 
Example #2
Source File: ValkyrienSkiesMod.java    From Valkyrien-Skies with Apache License 2.0 5 votes vote down vote up
@Mod.EventHandler
public void onFingerprintViolation(FMLFingerprintViolationEvent event) {
    if (MixinLoaderForge.isObfuscatedEnvironment) { //only print signature warning in obf
        FMLLog.bigWarning(
            "Valkyrien Skies JAR fingerprint corrupted, which means this copy of the mod "
                + "may have come from unofficial sources. Please check out our official website: "
                + "https://valkyrienskies.org");
    }
}
 
Example #3
Source File: MooFluids.java    From Moo-Fluids with GNU General Public License v3.0 5 votes vote down vote up
@Mod.EventHandler
public void invalidFingerprint(FMLFingerprintViolationEvent event) {
  if (ModInformation.MOD_FINGERPRINT.equals("@FINGERPRINT@")) {
    LogHelper.error("No fingerprint found!");
  } else {
    LogHelper.warn("Invalid fingerprint found!");
  }
}
 
Example #4
Source File: BetterChests.java    From BetterChests with GNU Lesser General Public License v3.0 4 votes vote down vote up
@EventHandler
public void onFingerprintViolation(FMLFingerprintViolationEvent event) {
	LogHelper.log(Level.WARN, "Invalid fingerprint detected! The version of the mod is most likely modified and an inofficial release.");
	LogHelper.log(Level.WARN, "Use with caution.");

}