Integrate LWCXProtection in YardWatch

A new protection hook, LWCXProtection, has been introduced to the YardWatch system, and the respective hook has been registered. Changes have been made to the service manager to facilitate this. Additionally, a relevant repository and corresponding dependency have been added to the pom.xml file for this purpose.
This commit is contained in:
2024-03-22 12:20:41 +01:00
parent 219a0da639
commit 648d628825
3 changed files with 107 additions and 0 deletions
@@ -1,6 +1,7 @@
package me.youhavetrouble.yardwatch;
import me.youhavetrouble.yardwatch.hooks.GriefPreventionProtection;
import me.youhavetrouble.yardwatch.hooks.LWCXProtection;
import me.youhavetrouble.yardwatch.hooks.WorldGuardProtection;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.RegisteredServiceProvider;
@@ -26,6 +27,12 @@ public final class YardWatch extends JavaPlugin {
);
}
if (shouldRegisterService("LWC")) {
getServer().getServicesManager().register(
Protection.class, new LWCXProtection(this), this, ServicePriority.Normal
);
}
}
/**