Add YardWatch plugin with WorldGuard integration

Introduced a new plugin, YardWatch, implemented with WorldGuard for protection. The plugin checks if WorldGuard is enabled and regulates breaking blocks, placing blocks, and interactions based on WorldGuard's build and interact flags. Also included are updated .gitignore and pom.xml files to manage the project setup.
This commit is contained in:
2024-03-21 21:52:44 +01:00
commit e516cf2ec6
5 changed files with 331 additions and 0 deletions
@@ -0,0 +1,20 @@
package me.youhavetrouble.yardwatch;
import me.youhavetrouble.yardwatch.hooks.WorldGuardProtection;
import org.bukkit.plugin.ServicePriority;
import org.bukkit.plugin.java.JavaPlugin;
public final class YardWatch extends JavaPlugin {
@Override
public void onEnable() {
if (getServer().getPluginManager().isPluginEnabled("WorldGuard")) {
getServer().getServicesManager().register(
Protection.class, new WorldGuardProtection(this), this, ServicePriority.Normal
);
}
}
}