Premium Resource Placeholders & Identifiers - Historical

Applied By AnnaDev: Feb 11, 2018 at 6:19 PM

Premium Resource Placeholders & Identifiers

Premium Resource Placeholders

The ins and outs

Spigot placeholders are super useful anti-piracy variables, injected into your plugin upon download.
This means Spigot can track and observe unmodified premium plugins.
You can protect yourself with obfuscation or individual class integrity protection.
Since spigot replaces these variables in all classes and it tampers with classes in general. Jar signing or Jar integrity protection is obfuscators like Stringer is not possible.

Now as you may or may not know, spigot injects its own anti piracy using these variables, and it's used as a deterrent to inexperienced plugin leakers. The more experienced however, know that anything is crackable, and you should keep this in mind.

The nitty-gritty

The placeholders are as follows.
  • "%%__USER__%%"
    • The ID of the user downloading the plugin.
    • You can go to to find the user page.
  • "%%__RESOURCE__%%"
    • The ID of the resource being downloaded.
    • You can go to to find the resource page.
  • "%%__NONCE__%%"
    • This is a unique ID for each and every single resource download. It is highly unlikely 2 downloads are going to have the same %%__NONCE__%.

How to use them

Using these placeholders is easy... They're simply replaced in a string. So when you compile and upload the following
Code (Java):
final String myUserString = "Welcome!"
    + "\nYour user ID is %%__USER__%%"
    + "\nThis resource ID is %%__RESOURCE__%%"
    + "\nAnd the unique download ID is %%__NONCE__%%";
Will get transformed and the various variables will be changed to the appropriate values.

This is a wiki page!

This is an open wiki page, and everyone can feel free to edit it. Please add any additional/new placeholders to benefit everyone.