YardWatch

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

Редакция NLZONE · 2 мин чтения · 0 просмотров
YardWatch
Скачать YardWatch1.16 – 26.3 · с официальной страницы: modrinth.com
Перейти к загрузке

Что это

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

  • Тип: мод
  • Загрузчик: bukkit, folia, paper, purpur, spigot
  • Версии Minecraft: 1.16 – 26.3
  • Скачиваний на Modrinth: 813

Подробно

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.

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: [](https://jitpack.io/#YouHaveTrouble/YardWatchAPI)

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

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

Maven xml jitpack.io https://jitpack.io com.github.YouHaveTrouble YardWatchAPI VERSION compile

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

For plugins wanting to see if something is protected

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

java public boolean canBreakBlock(Player player, Block block) { ServicesManager servicesManager = getServer().getServicesManager(); Collection > protections = servicesManager.getRegistrations(Protection.class); for (RegisteredServiceProvider 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; }

Как установить

Скачайте файл на официальной странице ниже и положите его в папку mods (для модов) или plugins (для плагинов) вашего сервера или клиента. Для модов нужен совместимый загрузчик. Версия должна совпадать с версией Minecraft.

Текст подготовлен автоматически из описания на Modrinth и ждёт проверки редакцией.

Редакция NLZONE

Пишем о серверах, модах и играх, в которые играем сами. Нашли ошибку — напишите нам, исправим.

Комментарии 0

Комментарии к этому материалу отключены.

Читайте также