Skip to content

Creating Restrictions

TehBrian edited this page Aug 23, 2022 · 2 revisions
  1. Make a new class that extends Restriction.
  2. Implement Restriction#check using the API of whatever plugin you're writing against.
  3. Add the @RestrictionInfo annotation to your class with the relevant information.

And you're done!

Check out the built-in WorldGuard and PlotSquared restrictions for some example code.

Clone this wiki locally