mirror of
https://github.com/YouHaveTrouble/YardWatch.git
synced 2026-05-12 06:26:59 +00:00
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:
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user