Which classes must keep their names?
Paste your plugin or mod descriptor before you obfuscate the jar. It's read in your browser; nothing is uploaded.
- In your browser
- Paper, Spigot, BungeeCord, Velocity, Fabric
Paste a descriptor to see the answer
plugin.yml, paper-plugin.yml, bungee.yml, velocity-plugin.json or fabric.mod.json. Or pick one from Examples.
What's always kept anyway
The manifest's Main-Class, META-INF/services providers, event handlers (@EventHandler, @Subscribe), enums, serializable members and Forge @Mod classes.
What only you can know (reflection, names in config files)
Classes you load by name (Class.forName, reflection, names in your config files) and fields a JSON library maps by name.
Then obfuscate the jar in a free account: ProGuard, yGuard or Skidfuscator, with these names kept. 3 runs a month.Then obfuscate the jar in a free account.Upload a jar
Same plugin. Much harder to read.
public final class AuctionPlugin extends JavaPlugin {
private final Map<UUID, Listing> listings = new HashMap<>();
@Override
public void onEnable() {
getCommand("ah").setExecutor(new AuctionCommand(this));
}
boolean canAfford(Player player, double price) {
return economy.getBalance(player) >= price;
}
}public final class AuctionPlugin extends JavaPlugin {
private final Map<UUID, a> a = new HashMap<>();
@Override
public void onEnable() {
this.getCommand(b.a("\u0d4f\u0d4a")).setExecutor(new c(this));
}
boolean a(Player var1, double var2) {
return d.a.getBalance(var1) >= var2;
}
}ProGuard
Renames classes, fields and methods. The default; works with almost every plugin.
Skidfuscator
Adds control-flow obfuscation and encrypted strings on top of renaming.
Maximum
ProGuard, then Skidfuscator: the strongest, for plugins worth the extra test.
Questions, answered
Why do some classes have to keep their names?
The server loads them by name from your descriptor: plugin.yml's main class, Fabric's entrypoints, mixins. Rename them and the plugin no longer loads. Everything else can be renamed.
Do I have to write keep rules myself?
Mostly not. SunLicense reads your jar and keeps the main class, Velocity and BungeeCord mains, Fabric entrypoints and mixins, service providers, event handlers and enums by itself. This checker shows what's left for you, such as a Paper bootstrapper.
Which obfuscators does SunLicense use?
ProGuard (the default), yGuard and Skidfuscator, which adds control-flow obfuscation and string encryption, or Maximum, which runs ProGuard and then Skidfuscator. You get a mapping file to read your own stack traces.
Is my descriptor uploaded?
No. The checker reads it in your browser; nothing is sent anywhere.
What does it cost?
The Free plan includes 3 obfuscation runs a month, with license keys and machine limits for the same plugin. Lite and Standard include more runs.
SunLicense