Here you can view details on how to create a warp addon using the Expansions Plugin API.
In Player Warps you can create a warp addon that will essentially decide if a player can set a warp in a specific location or create a warp on a certain event.
Registering
You can go here to learn on how to register an expansion.
Examples
Here is an example of a warp addon class, this will let you be able to decide if a player can set a warp at that specific location or not. You may also add events and what no as well in this as well.
importcom.olziedev.playerwarps.api.expansion.WAddon;importorg.bukkit.entity.Player;publicclassExampleWarpExpansionextendsWAddon{@OverridepublicbooleanisEnabled(){returntrue;}@OverridepublicStringgetName(){return"Example Expansion";}@OverridepublicvoidonLoad(){}@OverridepublicRunnableisAuthorized(Playerplayer){if(player.getLocation().getY()<5){return()->player.sendMessage("You are not authorized to use this command!");}returnnull;}}
When using the isAuthorized method, you can return null if you want them to be able to set a warp at that location.
If you do not want them to set a warp, you can return a runnable interface and whatever is in that code will be executed. If you're wondering why its a runnable, its so then the plugin will not execute every single addons' runnable at once when setting a warp.