Skip to content

Integrations

Petrus Pradella edited this page Jul 28, 2026 · 2 revisions

Integrations

EverNifeCore hooks into the common server plugins so your code can talk to economy, placeholders, world editing and land protection through one stable API - without hard-depending on any of them. Each integration is optional: when the target plugin is missing, the integration degrades quietly rather than crashing.

Economy - Vault and VaultUnlocked

VaultIntegration (Bukkit) and HyVaultIntegration (Hytale) find whatever economy the server has and register it as an IEconomyProvider. Bukkit prefers VaultUnlocked (net.milkbowl.vault2.economy.Economy, "V2") and falls back to classic Vault (net.milkbowl.vault.economy.Economy, "V1"); Hytale only has VaultUnlocked.

Your code never sees any of that - it calls FCEcoUtil:

import br.com.finalcraft.evernifecore.util.FCEcoUtil;

if (!FCEcoUtil.ecoTake(player, 500).warnIfInsufficient(player)) {
    return; // the player already got the localized "not enough money" message
}

The full contract, the semantics every implementation owes and what happens on a server without economy are on Economy.

Permissions

Permission checks use standard Bukkit permissions (player.hasPermission(...)), which most permission plugins - LuckPerms, PermissionsEx, GroupManager - implement transparently. For reading a player's LuckPerms meta values, the optional LuckPermsIntegration helper (br.com.finalcraft.evernifecore.integration.LuckPermsIntegration) wraps the LuckPerms API:

String prefix = LuckPermsIntegration.getMetaValue(uuid, "prefix");

It calls the LuckPerms API directly, so it must only be used when LuckPerms is present (the API throws if it is not installed).

PlaceholderAPI

McPAPIIntegration both resolves placeholders and registers your plugin's own. Resolution is null-safe on the plugin's presence:

import br.com.finalcraft.evernifecore.minecraft.integration.placeholders.McPAPIIntegration;

String text = McPAPIIntegration.parse(fPlayer, "Hello %player_name%, balance %vault_eco_balance%");

parse resolves PAPI placeholders when PlaceholderAPI is installed, then applies color codes either way. When PAPI is absent, the text is still color-translated and returned with the %...% tokens left intact - no exception. Registering your own placeholder namespace is done through createPlaceholderIntegration(...), which detects legacy vs. modern PAPI and registers the appropriate expansion for you. See Placeholders for the replacer side of the same system.

WorldEdit

WorldEditIntegration provides schematic pasting. It initializes only when WorldEdit is present (the Bukkit entry point guards the call and swallows any load error), exposing an apiLoaded flag and a worldEditPlugin handle:

import br.com.finalcraft.evernifecore.minecraft.integration.WorldEditIntegration;

if (WorldEditIntegration.apiLoaded) {
    WorldEditIntegration.pasteSchematic(schematicFile, targetLocation, customMask);
}

This path is written against the WorldEdit 6 API (com.sk89q.worldedit.*), so it targets servers running that generation of WorldEdit; guard your calls with apiLoaded. The version-specific WorldGuard compatibility used by the protection layer lives separately - see Version Compatibility.

Land protection

ProtectionAll aggregates every supported land-protection plugin behind the ProtectionHandler interface, so a single call answers "can this player act here?" regardless of which plugin is installed:

import br.com.finalcraft.evernifecore.minecraft.protection.ProtectionAll;

ProtectionHandler protection = ProtectionAll.getInstance();
if (protection.canBuild(player, location)) {
    // place the block
}

ProtectionHandler covers canBuild, canBreak, canInteract, canAttack, canUseAoE, and the region-wide canBuildOnRegion / canBreakOnRegion. The bundled handlers are:

Plugin Handler
WorldGuard WorldGuardHandler (with per-version compatibility wrappers)
GriefDefender GriefDefenderHandler
GriefPreventionPlus GriefPreventionPlusHandler

Degradation. ProtectionAll includes only the handlers whose plugin is enabled. Each check is the AND of the present handlers - the action is allowed only if every installed protection plugin allows it. With no protection plugin installed, the handler set is empty and every check returns true (there is nothing to deny). Individual handlers (ProtectionWorldGuard, ProtectionGPP) are also available if you need to target one plugin directly.

BossShopPro

EverNifeCore ships a BossShopPro customizer (ECItemStackTranslator) and its own shop types (ECShop / ECConfigShop) that let a shop item carry EverNifeCore NBT data parts. This is an advanced, opt-in integration for servers already running BossShopPro; see Items and NBT for the data-part layer it builds on.

See also

Clone this wiki locally