Перейти к содержимому
Mineforgian

WorldGuard ExtraFlags Plus

Adds 30+ extra WorldGuard flags - Folia, Disable Mace & more, Permit entry by XP or PAPI, and more.

Загрузки
12K
Подписчики
35
Обновлён
25 июня 2026 г.
Лицензия
MIT

Опубликован 2 ноября 2025 г.

Исходный код

WorldGuard ExtraFlags Plus

Release 4.4.1

An advanced WorldGuard extension that adds over 30+ extra region flags for full control of player behavior, teleportation, and region rules — featuring Folia support, item blocking (Mace, Firework, Wind Charge, Totem, vanilla Spears), throwable-only blocking (disable-throw for egg, snowball, pearl, XP bottle), optional PacketEvents/ProtocolLib packet hooks for full disable-completely coverage, and fully customizable messages.

🧱 Folia Ready | ⚙️ Custom Messages | 🪓 Disable Mace, Totem, Trident, Spears & More | 🥚 Disable-throw (egg / snowball / pearl / XP bottle)

🎚️ XP-Based or PlaceholderAPI (integer output) based region entry limits


⚠️ Warning DO NOT USE BOTH PLUGINS TOGETHER!

If you're upgrading from WorldGuardExtraFlags to WorldGuardExtraFlagsPlus, make sure to:

  • Remove the old WorldGuardExtraFlags.jar plugin file
  • Only keep WorldGuardExtraFlagsPlus.jar on your server
  • Both plugins cannot coexist - they will conflict with each other

Key Features

  • Folia support – fully compatible with async region handling
  • 🛡️ New flag: disable-completely – blocks all usage of specified items (MACE, FIREWORK_ROCKET, WIND_CHARGE, TOTEM_OF_UNDYING, TRIDENT, vanilla spear tiers 1.21.11+, plus SPEAR for all tiers at once)
    • Note: permit-completely is replaced. Please use disable-completely instead.
    • Spear Lunge (packet STAB, including Lunge enchant) requires PacketEvents or ProtocolLib on the server for reliable blocking; without either, Lunge may bypass region checks.
  • 🎯 New flag: disable-throw – blocks launching only these throwables: EGG, SNOWBALL, ENDER_PEARL, EXPERIENCE_BOTTLE. Tridents and wind charges stay on disable-completely.
  • 🎚️ New flags: entry-min-level / entry-max-level – restrict entry by XP level or PlaceholderAPI values
  • 💬 Customizable messages via messages-wgefp.yml (disable, recolor, or use placeholders)
  • 🔁 Message cooldown system to prevent spam (default 3 seconds)
  • 🏪 New flag: villager-trade – control villager trading in regions
  • 🚫 New flag: disable-collision – disable player collision in regions
    • Uses Minecraft's native scoreboard teams to control collision. TAB plugin is supported with API integration. May conflict with other plugins that use teams. See (public-documents/disable-collision flag documentation.md) for details.
  • 📝 PlaceholderAPI Chat Integration – chat prefix/suffix supports PlaceholderAPI placeholders
  • 🧱 New flags: allow-block-place / deny-block-place / allow-block-break / deny-block-break – fine-grained block placement and breaking control
  • 📦 New flags: deny-item-drops / deny-item-pickup – restrict specific items from being dropped or picked up (works when WorldGuard allows drops/pickups)
  • 🔨 New flag: permit-workbenches – block workbench usage (anvil, crafting table, ender chest, etc.) and crafting table crafting in regions
    • Note: permit-workbenches CRAFT now only blocks crafting table (3x3) crafting, not inventory (2x2) crafting. Use inventory-craft flag to block inventory crafting.
  • 🎨 New flag: inventory-craft – block inventory crafting (2x2 grid) in regions
  • 🛡️ Godmode & Fly Flag Enhancement – The godmode and fly flags now also disable EssentialsX godmode/fly when entering regions with these flags disabled (EssentialsX integration)
  • 👥 New flag: player-count-limit – limit maximum number of players in a region
  • 🎯 New flag (experimental): chambered-enderpearl – mitigates chambered ender pearl bypasses (pearls thrown outside denied regions are removed when the shooter enters a region where the flag denies); subject to change.

About

WorldGuard protects land by defining regions. WorldGuard ExtraFlags Plus extends it with even more customization — adding powerful flags that modify gameplay, teleportation, commands, and behavior within regions.


Included Flags (30+)

Here’s a quick overview — all managed with standard WorldGuard flag commands.

[teleport-on-entry / teleport-on-exit]  [command-on-entry / command-on-exit]
[console-command-on-entry / console-command-on-exit]  [walk-speed / fly-speed]
[keep-inventory / keep-exp]  [chat-prefix / chat-suffix]  [godmode] 
[blocked-effects]  [respawn-location]  [worldedit]  [give-effects]  
[fly]  [play-sounds]  [frostwalker]  [nether-portals]  [glide](elytra-blocker)
[chunk-unload]  [item-durability]  [join-location](not-on-folia)

New in Plus:

[disable-completely]  [disable-throw]
[entry-min-level / entry-max-level]
[villager-trade]  [disable-collision]  [deny-item-drops / deny-item-pickup]
[allow-block-place / deny-block-place]  [allow-block-break / deny-block-break]
[permit-workbenches]  [inventory-craft]  [player-count-limit]
[chambered-enderpearl](experimental)

📖 Flag Usage Guide

For comprehensive usage examples and detailed flag documentation, see: Complete Flag Usage Guide


Version Compatibility

Minecraft WorldGuard ExtraFlagsPlus Support
1.20 – 1.21.11 7.0.15+ 4.4.1+ ✅ Active
1.7 – 1.19 Older ❌ No support

The jar declares api-version: 1.21 in plugin.yml so Paper 1.21.x servers (and forks such as Canvas) load it; the project still compiles against the pinned Paper API artifact in the root pom.xml.


Message Customization

All plugin messages live in plugins/WorldGuard/messages-wgefp.yml.

  • Edit freely to match your style
  • Use {required}, {current}, {item}, {workbench} placeholders (e.g. disable-throw-blocked uses {item})
  • Color codes supported (&c, &7, etc.)
  • Disable messages with ""
  • Reload instantly using /wgefp reload or /wg reload

Authors

  • ExtraFlags Plus Developer: tins
  • Original ExtraFlags Author: isokissa3

Support & Community


Image Section


⭐ If you like this project, give it a star on Github

Ченджлог

4.4.1Релиз26.1.1, 26.1.2, 26.2 · 25 июня 2026 г.
  • blocked-effects, give-effects, and play-sounds skip tick work when the flag is inactive and there’s nothing to restore
  • blocked-effects avoids calling hasBypass() every tick when no flag value applies (less LuckPerms/cache overhead)
  • blocked-effects uses one runAtEntity task per tick instead of N+1 separate schedules
4.4.0Релиз26.1.1, 26.1.2, 26.2 · 20 июня 2026 г.

Build & runtime

  • Version 4.4.0 — feature and stability release after Folia/performance audit.
  • Java 21 bytecode (--release 21) for broader Paper 1.21.x / 26.1–26.3 server compatibility.
  • Paper API compile target: 26.1.2.build.67-stable; plugin.yml remains api-version: '1.21'.
  • FoliaLib shading hardened: explicit shade includes + post-package check that WrappedBukkitTask and SpigotImplementation exist in the jar (fixes NoClassDefFoundError breaking command-on-entry and all schedulers on Paper 26.x).

Command flags

  • Shared CommandFlagHandlerSupport for entry/exit player and console command flags.
  • Entry commands dispatch only from entered regions with correct last-set tracking; exit commands run for all removed command sets.
  • Player commands use runAtEntity; console commands use runNextTick.
  • Scheduler self-test on enable logs SEVERE if FoliaLib is broken.

Config & startup (#14, #13)

  • logging.verbose-startup-logs (default false) — quiet console on large servers.
  • Config.initialize() in onLoad() before flag registration — disabled flags (e.g. glide) are not registered; reduces “plugin not installed” unknown-flag warnings.
  • Chunk-unload tickets: one summary line per world; collision init only when flag enabled.

Give-effects (#15)

  • PotionEffectFlag accepts night_vision, minecraft:night_vision, legacy names, and normalized spacing.

Keep-inventory & combat log

  • keep-inventory-settings.combat-log-restore (default true) — DeluxeCombat soft integration: snapshot inventory on combat-log quit inside keep-inventory regions, restore on next join.
  • Death handler priority HIGHEST so other plugins are less likely to clear drops after keep-inventory applies.

Block flags

  • allow-block-place-settings.require-membership / allow-block-break-settings.require-membership — allow lists apply only to region members/owners (e.g. member-only sign placement).

New flag: hide-players (experimental)

  • Opt-in via all-flags-control.hide-players: true, then /rg flag <region> hide-players true.
  • Hides players from others while inside the region (hub/lobby optimization via Bukkit hidePlayer).

Join-location

  • Improved Paper/Folia/Canvas detection — prefers AsyncPlayerSpawnLocationEvent over deprecated PlayerSpawnLocationEvent on modern servers.

Folia / performance audit fixes

  • Collision apply on join/world-change via runAtEntity (not global runNextTick).
  • Chambered ender pearl listener rewrite (thread-safety, scheduler).
  • Player count limit uses world-scoped player scan.
  • Chunk-unload batched async chunk tickets.
  • Join-location fallback uses teleportAsync.
  • Fly/godmode quit cache cleanup; entry-level placeholder cache eviction; onDisable task cancel.

Config documentation

  • Inline comments for give-effects syntax, worldedit __global__ usage, glide disable behavior, hide-players setup.
4.3.13Релиз1.21.9, 1.21.10, 1.21.11 · 4 мая 2026 г.

Changelog - Release 4.3.13

4.3.13

disable-throw region flag

  • SetFlag listing EGG, SNOWBALL, ENDER_PEARL, EXPERIENCE_BOTTLE only (validated by ThrowableItemFlag); ProjectileLaunchEvent cancellation + disable-throw-blocked message ( messages-wgefp.yml ). Trident / wind charge remain on disable-completely. Toggle via config-wgefp.yml all-flags-control.disable-throw.

Build / runtime targets (Maven)

  • Minecraft / Paper 26.1.2: compile against io.papermc.paper:paper-api pinned to 26.1.2.build.60-stable (matches Paper repo maven-metadata.xml release at time of update); bump this property when Paper ships newer 26.1.2.build.* builds. org.spigotmc:spigot-api removed — Paper supplies the Bukkit API (Paper project setup).
  • javac --release 25 per Paper’s 26.1.x toolchain recommendation (same doc).
  • plugin.yml: api-version: '1.21' so Paper / forks (e.g. Canvas) 1.21.x accept the jar at load time; declaring 26.1.2 causes Unsupported API version on those servers (Paper plugin.yml).
  • Still bundled vs provided: WorldEdit 7.3.18, WorldGuard 7.0.15-SNAPSHOT, FAWE-Core 2.12.0, bstats 3.1.0, ConfigLib 4.8.0, Lombok 1.18.46, shade 3.6.2. paper-repo remains last in <repositories> to avoid probing EngineHub coords against Paper first.

Join location (Paper / Folia)

  • When join-location is enabled and the server provides Paper's AsyncPlayerSpawnLocationEvent, register AsyncJoinLocationListener instead of deprecated Spigot PlayerSpawnLocationEvent, avoiding startup deprecation noise (aligned with PR #12).
  • Plain Spigot (no async API): unchanged JoinLocationListener and existing deprecation console hint.
  • JoinLocationPlayerJoinListener (PlayerJoinEvent, monitor): if join-location resolves at the player's spawn position and differs by block, teleport on the entity scheduler. Covers Folia (and similar cases) where async spawn handlers cannot reliably apply region queries before login (Issue #1); uses LocalPlayer for the query like JoinLocationListener.

WorldEdit flag + FastAsyncWorldEdit (FAWE)

  • WorldEditFlagHandler now intercepts FAWE batch extent APIs (setBlocks, replaceBlocks, coordinate setBlock, setBiome) in addition to per-block setBlock, so worldedit DENY is much harder to bypass under FAWE (addresses Issue #7–style gaps).
  • Compile against FastAsyncWorldEdit-Core provided (Modrinth Maven); WorldGuard’s transitive WorldEdit jars are excluded on the Spigot module so the patched AbstractDelegateExtent API matches runtime FAWE/WorldEdit.
  • Optional permissions: worldguardextraflagsplus.worldedit.bypass, worldguardextraflagsplus.worldedit.silent-deny.
  • New message key worldedit-denied in messages-wgefp.yml / PluginMessages (reload to customize).

Disabled flags in config-wgefp.yml (handler null-safety)

  • When all-flags-control turns off fly or give-effects, WorldGuard does not register those session handlers — Session#getHandler returns null. PlayerListener, EntityPotionEffectEventListener, and RemoveEffectPacketListener now check Config.isFlagEnabled and null handlers before use (fixes Issue #9 NPE on e.g. PlayerChangedWorldEvent).

fly after PLUGIN teleports (portals)

  • After PlayerTeleportEvent (monitor), re-query fly at the destination and call FlyFlagHandler#refreshFlyFromApplicableSet, so flight matches regions when session move hooks do not run (e.g. Issue #8 portal plugins).

command-on-entry / console-command-on-entry

  • initialize(LocalPlayer, …) added so commands run when the session starts already inside a region with the flag (previously only onCrossBoundary fired, so login/spawn inside the region did nothing). console-command-on-entry also aligns isEmpty checks with command-on-entry.
  • Command strings: strip a leading / only when present — YAML pasted without / no longer turns say hi into ay hi. command-on-exit / console-command-on-exit use the same helper; skip blank lines after processing.
4.3.12Релиз1.21.9, 1.21.10, 1.21.11 · 4 мая 2026 г.

disable-completely — Vanilla spears (1.21.11+)

  • Block spear items: tier materials (WOODEN_SPEAR, STONE_SPEAR, COPPER_SPEAR, IRON_SPEAR, GOLDEN_SPEAR, DIAMOND_SPEAR, NETHERITE_SPEAR) and the SPEAR shorthand (all tiers).
  • Riptide interaction blocking extended to spears as well as tridents when the item is disabled in the region.
  • Spear Lunge (packet STAB, including Lunge enchant use) is only reliably blocked when PacketEvents or ProtocolLib is installed; without either, Lunge may bypass Bukkit-only checks.

Packet-level blocking (optional plugins)

  • disable-completely registers PacketEvents listeners when the PacketEvents plugin is present (primary): cancels relevant serverbound packets including spear Lunge via digging action STAB, plus use/interact/placement paths as implemented.
  • ProtocolLib is supported as a fallback when PacketEvents is not used or hook registration fails.

Safe startup without PacketEvents / ProtocolLib

  • Main plugin class avoids hard references to PacketEvents and ProtocolLib APIs; registration uses reflection so the jar loads cleanly when optional dependencies are absent (provided / softdepend).
  • PacketEvents API entry uses com.github.retrooper.packetevents.PacketEvents (correct package); avoids bogus io.github.retrooper... lookups that broke hook registration at runtime.
  • ProtocolLibHelper (give-effects) registers its listener via reflection only so the helper class does not require ProtocolLib on the classpath at load time.

New flag: chambered-enderpearl (experimental)

  • Experimental. State flag to mitigate chambered ender pearl style bypasses: tracks pearls thrown outside flagged regions and removes them when the shooter enters a region where the flag denies the behavior (handler + session integration; configurable via config-wgefp.yml flag toggle like other flags). Behavior and defaults may change in future releases.
4.3.11Релиз1.21.9, 1.21.10, 1.21.11 · 10 января 2026 г.
4.3.10Релиз1.21.9, 1.21.10, 1.21.11 · 18 декабря 2025 г.

Disable Collision Flag - Major Refactor

Implementation Changes

  • Minecraft teams: Now uses Minecraft's native scoreboard team system (the only reliable method for entity-to-entity collision)
  • Hybrid team-based approach:
    • If a player is the only member of their team, the plugin temporarily modifies that team's collision rule
    • If a player is in a team with multiple members, creates a per-player team (WGC_<hash>) to avoid affecting others
    • If a player has no team, adds them to a per-player team with collision disabled

TAB Plugin Integration

  • Full API integration: Added TAB plugin support with API integration
  • Priority handling: TAB integration takes priority over direct team manipulation when TAB is installed
  • Conflict prevention: Uses TAB's API to set collision rules, preventing TAB from overwriting collision settings
  • Automatic fallback: If TAB is not available, automatically falls back to direct team manipulation

Without TAB (Normal Usage)

  • Direct team manipulation: Uses Bukkit's Scoreboard API to directly modify team collision rules
  • Team restoration: Properly restores original team collision rules when players leave regions
  • Per-player teams: Creates temporary per-player teams when needed to avoid conflicts with shared teams
  • Cleanup on disable: Properly cleans up all teams and restores original settings when plugin disables

Warnings and Compatibility

  • Load-time warning: Displays a warning on plugin load about potential conflicts with team-using plugins
  • Known plugin detection: Warns about potential conflicts with couple known plugin names
  • TAB support indication: Shows supported plugins

Documentation Updates

  • Updated documentation: Comprehensive documentation file updated with TAB integration details
  • Troubleshooting guide: Added troubleshooting information for team conflicts
4.3.9Релиз1.21.9, 1.21.10, 1.21.11 · 18 декабря 2025 г.

Fixed

  • Fixed command-on-entry and command-on-exit flags causing thread check errors on Folia servers by using entity scheduler instead of global scheduler for player command dispatch
  • Fixed disable-collision flag causing player disconnections on Paper servers by properly handling IllegalStateException when removing players from teams
  • Fixed disable-collision flag on Folia servers - feature is now automatically disabled if team creation is not supported (prevents errors and warnings)

Added

  • Added support for %player% and {player} placeholders in command-on-entry, command-on-exit, console-command-on-entry, and console-command-on-exit flags (in addition to existing %username% and {username} placeholders)
  • Added EssentialsX godmode integration - the godmode flag now also disables EssentialsX godmode when entering regions with godmode disabled (EssentialsX is now a soft dependency)

Changed

  • Migrated configuration management to ConfigLib library for improved maintainability, automatic comment preservation, and better error handling
  • Updated API version to 1.21 - plugin now officially supports Paper 1.21.10+, Spigot 1.21.x, and Folia 1.21.x
4.3.8Релиз1.21.9, 1.21.10, 1.21.11 · 14 декабря 2025 г.

New Features

  • Added inventory-craft flag - Block inventory crafting (2x2 grid) in regions
  • Added Discord support link - Join our community: https://discord.gg/TCJAwsdqum

Breaking Changes

  • Removed permit-completely flag - Use disable-completely instead (automatic migration included)
  • Changed permit-workbenches CRAFT behavior - Now only blocks crafting table (3x3), not inventory crafting. Use deny-inventory-craft for inventory blocking.

Improvements

  • Automatic message migration: permit-completely-blocked → disable-completely-blocked
  • Automatic message key addition for new flags
  • File-based region migration runs automatically on plugin load

Documentation

  • Updated all documentation with new flags
  • Added Discord community link
  • Updated version compatibility tables

Note:

Existing permit-completely flags in region files will be automatically migrated to disable-completely on plugin load.

Комментарии

Загружаем…