COWMODSКаталог модов

YardWatch

Plugin and API allowing developers to hook into multiple protection plugins without needing to depend on them

Автор: YouHaveTrouble8261обновлён 27 сент. 2025 г.
Механики игрыБиблиотекиУтилиты

Описание

YardWatch (for server owners)

Implementation of YardWatchAPI for common protection plugins. If any of supported plugins implements the API itself, then this plugin will stop providing its implementation to allow the plugin to take over.

If you're a developer looking for information how to implement YardWatchAPI in your plugin, see YardWatchAPI

Requirements

  • Java 17
  • Minecraft 1.16+

Implementations for:

  • GriefPrevention (v16+)
  • WorldGuard (7.0.0+)
  • LWCX
  • FactionsUUID
  • SuperiorSkyBlock
  • Towny
  • PlotSquared (6.0.0+)

Plugin you're using is not implementing YardWatchAPI?

Contact the plugin developer and send them here!

You can also request a temporary implementation within this plugin here.

YardWatchAPI (for developers)

API to unify protection plugins for minecraft bukkit servers to allow easy protection queries without having to import 10 different plugin apis with separate implementations.

Current version:

If you're looking for a plugin implementing YardWatchAPI for common protection plugins, see YardWatch plugin.

Usage

Import the api using dependency manager

In any case of usage you will need to import the API. Replace VERSION with current version tag. You should also adjust your <scope> to provided if you're not implementing the api and just querying it.

Maven

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>
<dependency>
    <groupId>com.github.YouHaveTrouble</groupId>
    <artifactId>YardWatchAPI</artifactId>
    <version>VERSION</version>
    <scope>compile</scope>
</dependency>

Gradle

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}
dependencies {
    compileOnly 'com.github.YouHaveTrouble:YardWatchAPI:VERSION'
}

For plugins wanting to see if something is protected

Check if player can break a block

Example handling of block breaking check. There's no need to depend on any plugins for this.

public boolean canBreakBlock(Player player, Block block) {
    ServicesManager servicesManager = getServer().getServicesManager();
    Collection<RegisteredServiceProvider<Protection>> protections = servicesManager.getRegistrations(Protection.class);
    for (RegisteredServiceProvider<Protection> protection : protections) {
        if (protection.getProvider().canBreakBlock(player, block.getState(true))) continue;
            return false; // if any protection plugin disallowed breaking the block, return false
        }
    // If all protection plugins allowed breaking the block, return true
    return true;
}

For protection plugins

Depend on YardWatch plugin

You can optionally softdepend and check if YardWatch is present to add an optional integration.

depend:
  - "YardWatch"

Implement Protection interface

Implement all the methods required by the interface

public class YourPluginProtection implements Protection {}

Register your implementation as a service

@Override
public void onEnable() {
    getServer().getServicesManager().register(
        Protection.class,
        new YourPluginProtection(),
        this,
        ServicePriority.Normal
    );
}

Последние версии

Все версии →
release

YardWatch 1.4.1

1.4.1
27 сент. 2025 г.162Minecraft: 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2, 26.3bukkit, folia, paper, purpur, spigot
Скачать
Что нового
- Improve FUUID support
release

YardWatch 1.4.0

1.4.0
14 авг. 2024 г.154Minecraft: 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6-pre1, 1.21.6-pre2, 1.21.6-pre3, 1.21.6-pre4, 1.21.6-rc1, 1.21.6, 1.21.7, 1.21.8bukkit, folia, paper, purpur, spigot
Скачать
Что нового
- added plotsquared support
release

YardWatch 1.3.0

1.3.0
19 июл. 2024 г.121Minecraft: 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21bukkit, folia, paper, purpur, spigot
Скачать
Что нового
- added query subcommand allowing to check protections in a location player is standing in - added YardWatch API version to /yw command feedback - fixed NPE in worldguard implementation
release

YardWatch 1.2.0

1.2.0
5 июн. 2024 г.147Minecraft: 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21bukkit, folia, paper, purpur, spigot
Скачать
Что нового
- added a command to see plugins actively hooking into YardWatch plugin for debugging purposes. - paper on 1.20.5+ will no longer remap the plugin, because it doesn't have to :)
release

YardWatch 1.1.0

1.1.0
16 апр. 2024 г.124Minecraft: 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6bukkit, folia, paper, purpur, spigot
Скачать
Что нового
Added implementations for: - Towny - SuperiorSkyblock2
release

YardWatch 1.0.0

1.0.0
16 апр. 2024 г.118Minecraft: 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4bukkit, folia, paper, purpur, spigot
Скачать
Что нового
Added implementations for: - GriefPrevention (v16+) - WorldGuard (7.0.0+) - LWCX - FactionsUUID