mirror of
https://github.com/YouHaveTrouble/YardWatch.git
synced 2026-05-12 06:26:59 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -14,7 +14,7 @@ If you're a developer looking for information how to implement YardWatchAPI in y
|
|||||||
## Implementations for:
|
## Implementations for:
|
||||||
- [GriefPrevention (v16+)](https://www.spigotmc.org/resources/griefprevention.1884/)
|
- [GriefPrevention (v16+)](https://www.spigotmc.org/resources/griefprevention.1884/)
|
||||||
- [WorldGuard (7.0.0+)](https://enginehub.org/worldguard#downloads)
|
- [WorldGuard (7.0.0+)](https://enginehub.org/worldguard#downloads)
|
||||||
- LWCX
|
- [LWCX](https://www.spigotmc.org/resources/lwc-extended.69551/)
|
||||||
- [FactionsUUID](https://www.spigotmc.org/resources/factionsuuid.1035/)
|
- [FactionsUUID](https://www.spigotmc.org/resources/factionsuuid.1035/)
|
||||||
- [SuperiorSkyBlock](https://bg-software.com/superiorskyblock/)
|
- [SuperiorSkyBlock](https://bg-software.com/superiorskyblock/)
|
||||||
- [Towny](https://github.com/TownyAdvanced/Towny)
|
- [Towny](https://github.com/TownyAdvanced/Towny)
|
||||||
|
|||||||
@@ -26,41 +26,53 @@ public final class YardWatch extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (shouldRegisterService("WorldGuard")) {
|
if (shouldRegisterService("WorldGuard")) {
|
||||||
|
getLogger().info("Registering WorldGuard service.");
|
||||||
getServer().getServicesManager().register(
|
getServer().getServicesManager().register(
|
||||||
Protection.class, new WorldGuardProtection(this), this, ServicePriority.Normal
|
Protection.class, new WorldGuardProtection(this), this, ServicePriority.Normal
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldRegisterService("GriefPrevention")) {
|
if (shouldRegisterService("GriefPrevention")) {
|
||||||
|
getLogger().info("Registering GriefPrevention service.");
|
||||||
getServer().getServicesManager().register(
|
getServer().getServicesManager().register(
|
||||||
Protection.class, new GriefPreventionProtection(this), this, ServicePriority.Normal
|
Protection.class, new GriefPreventionProtection(this), this, ServicePriority.Normal
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldRegisterService("LWC")) {
|
if (shouldRegisterService("LWC")) {
|
||||||
|
getLogger().info("Registering LWC service.");
|
||||||
getServer().getServicesManager().register(
|
getServer().getServicesManager().register(
|
||||||
Protection.class, new LWCXProtection(this), this, ServicePriority.Normal
|
Protection.class, new LWCXProtection(this), this, ServicePriority.Normal
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldRegisterService("Factions")) {
|
if (shouldRegisterService("Factions")) {
|
||||||
|
getLogger().info("Registering Factions service.");
|
||||||
getServer().getServicesManager().register(
|
getServer().getServicesManager().register(
|
||||||
Protection.class, new FactionsUUIDProtection(this), this, ServicePriority.Normal
|
Protection.class, new FactionsUUIDProtection(this), this, ServicePriority.Normal
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldRegisterService("SuperiorSkyblock2")) {
|
if (shouldRegisterService("SuperiorSkyblock2")) {
|
||||||
|
getLogger().info("Registering SuperiorSkyblock2 service.");
|
||||||
getServer().getServicesManager().register(
|
getServer().getServicesManager().register(
|
||||||
Protection.class, new SuperiorSkyBlockProtection(this), this, ServicePriority.Normal
|
Protection.class, new SuperiorSkyBlockProtection(this), this, ServicePriority.Normal
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldRegisterService("Towny")) {
|
if (shouldRegisterService("Towny")) {
|
||||||
|
getLogger().info("Registering Towny service.");
|
||||||
getServer().getServicesManager().register(
|
getServer().getServicesManager().register(
|
||||||
Protection.class, new TownyProtection(this), this, ServicePriority.Normal
|
Protection.class, new TownyProtection(this), this, ServicePriority.Normal
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<RegisteredServiceProvider<?>> registrations = getServer().getServicesManager().getRegistrations(this);
|
||||||
|
if (registrations.isEmpty()) {
|
||||||
|
getLogger().info("Registered 0 services. This plugin can be safely removed.");
|
||||||
|
} else {
|
||||||
|
getLogger().info("Successfully registered " + registrations.size() + " services.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user