DuckyZones 图标

DuckyZones

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 2.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/duckyzones
资源信息

Minecraft 版本: 1.21.11 26.1 26.1.1 26.1.2 26.2

平台: bukkit paper purpur spigot

标签: game-mechanics management utility

资源介绍

DuckyZones

Create custom zones with powerful rules and effects in your Minecraft world!
Highly configurable, efficient, and perfect for custom maps, events, or gameplay control.


Description

DuckyZones allows you to define specific rectangular areas (zones) in your world where certain rules and effects apply.
Whether you're building PvP arenas, adventure maps, or controlled environments, this plugin gives you full control over player behavior inside defined areas.


Features

  • Create custom zones with two corners
  • Per-zone world support
  • Block specific items or effects inside a zone
  • Require specific items or effects to enter
  • Disable Elytra inside zones (auto-removes Elytra from player)
  • Configure health and XP level limits
  • Apply potion effects automatically in a zone
  • Custom denial messages for rule violations
  • Easy reload support without restarting the server
  • Simple config.yml layout
  • Built with Java 21, supports Minecraft 1.21.11+

Configuration

config.yml

# List of Items (1.21.11) : https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
# List of Effects (1.21.11) : https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html
region-flags:
  mob-entry:
    knockback-strength: 0.6
    knockback-y: 0.15
    cooldown-ms: 250
zones:
  spawn: # Zone name
    priority: 0 # Higher priority wins when regions overlap
    flags:
      pvp: DENY
      build: DENY
      greeting: "&aWelcome to %region%!"
    world: world # World where zone is
    corner1: world,100,64,100 # First Zone Corner
    corner2: world,110,70,110 # Second Zone Corner
    elytra-disabled: false # Should be elytra disabled in that zone? This will remove the elytra from the player
    elytra-disabled-message: "Elytra is disabled in this zone!"
    blocked-items: # Player with these items in inventory cannot enter the zone
      - TNT
      - ENDER_PEARL
    blocked-effects: # Player with these effects cannot enter the zone, after leaving it they will disappear separator; means the power of the effect, e.g. SPEED;1 = Speed 1 in the game, if you want to block all powers of effect, you must do ;-1
      - SPEED;-1
      - INVISIBILITY;1
    required-items: # Only Player with these items in inventory can enter the zone
      - DIAMOND
      - TOTEM_OF_UNDYING
    required-effects: # Only Players with these effects can enter the zone, after leaving it they will disappear separator; means the power of the effect, e.g. SPEED;1 = Speed 1 in the game, if you want to block all powers of effect, you must do ;-1
      - NIGHT_VISION;1
    zone-effects: # Effects that will be applied after entering the zone, after leaving it they will disappear separator; means the power of the effect, e.g. SPEED; 1 = Speed 1 in the game
      - STRENGTH;2
    min-health: 5.0 # Players who do not have this number of hearts cannot enter
    max-health: 20.0 # Players who have this number of hearts or more cannot enter
    min-level: 5 # Players who do not have this amount of exp level cannot enter
    max-level: 100 # Players who have this amount of exp level or more cannot enter
    deny-message: "&cYou can't enter this area!" # Players who are unable to enter the zone will receive this message in chat when trying to enter
    zone-teleport-back-command: "spawn %player%" # The command that will be executed when the player enters the zone e.g. through teleportation, to call the player's nickname, just type %player%
    entry-deny-title: "&cEntrance prohibited" # Title that will appear on the screen when a player tries to enter the zone without meeting the requirements
    entry-deny-subtitle: "%reason%" # SubTitle that will appear on the screen when a player tries to enter the zone without meeting the requirements
    entry-deny-actionbar: "&eGet away from the zone!" # ActionBar that will appear on the screen when a player tries to enter the zone without meeting the requirements
    entry-deny-bossbar: "&4Entrance to the zone blocked!" # BossBar that will appear on the screen when a player tries to enter the zone without meeting the requirements
    entry-deny-sound: ENTITY.VILLAGER.NO # Sound that will play on the screen when a player tries to enter the zone without meeting the requirements
    afk-zone:
      enabled: false # Is this an AFK zone with rewards?
      actionbar-format: "&eRewards: {rewards}"  # Main ActionBar format which will be shown in actionbar inside an AFK zone
      rewards:
        reward1:
          interval: 60 # Time in seconds between rewards
          chance: 10.0 # Default chance for players without specific permissions (0-100%)
          permission-chances: # Override chance based on player permissions
            "duckyzones.afk.vip": 50.0
            "duckyzones.afk.premium": 75.0
          bossbar-format: "&eReward 1 in {time}"     # Bossbar
          commands: # Commands to execute when reward is given
            - "give %player% diamond 1"
            - "tellraw %player% {\"text\":\"You received a reward for being AFK!\",\"color\":\"green\"}"
        reward2:
          interval: 300 # 5 minutes
          chance: 50.0 # 50% default chance
          bossbar-format: "&eReward 2 in {time}"     # Bossbar
          permission-chances:
            "duckyzones.afk.premium": 100.0 # Premium players always get this reward
          commands:
            - "give %player% emerald 1"

Commands

  • /duckyzones selector - gives the region selector tool. Left click a block to set position 1 and right click a block to set position 2.
  • /duckyzones pos1 - sets position 1 to your current block location.
  • /duckyzones pos2 - sets position 2 to your current block location.
  • /duckyzones create <name> - creates a cuboid region from the selected positions.
  • /duckyzones manage <name> - opens the management GUI for one region.
  • /duckyzones gui - opens the region list GUI.
  • /duckyzones reload - reloads the plugin configuration.

PlaceholderAPI

DuckyZones soft-depends on PlaceholderAPI. When PlaceholderAPI is installed and enabled, DuckyZones registers the duckyzones expansion and also parses PlaceholderAPI placeholders in configured DuckyZones messages.

Supported external placeholders:

  • %duckyzones_region_count% - total loaded regions
  • %duckyzones_current_region% or %duckyzones_primary_region% - highest-priority region at the player location
  • %duckyzones_current_regions% or %duckyzones_regions% - all regions at the player location
  • %duckyzones_current_region_count% - number of regions at the player location
  • %duckyzones_highest_priority% or %duckyzones_priority% - priority of the current primary region
  • %duckyzones_world% - player world
  • %duckyzones_flag_<flag-id>% - resolved flag value at the player location, for example %duckyzones_flag_build%
  • %duckyzones_flag_source_<flag-id>% - source region ids for the resolved flag
  • %duckyzones_flag_priority_<flag-id>% - priority used for the resolved flag

Any region-readable placeholder can target a configured region by adding region_<region-id>_ after the duckyzones identifier. Examples:

  • %duckyzones_region_spawn_id% - region id
  • %duckyzones_region_spawn_priority% - configured priority of the spawn region
  • %duckyzones_region_spawn_world% - region world
  • %duckyzones_region_spawn_flags% or %duckyzones_region_spawn_flag_count% - number of flags set on the region
  • %duckyzones_region_spawn_volume% - inclusive block volume of the region
  • %duckyzones_region_spawn_min_block_x% and %duckyzones_region_spawn_max_block_x% - region bounds
  • %duckyzones_region_spawn_flag_build% - direct build flag value set on the region
  • %duckyzones_region_spawn_flag_source_build% - source region id for the direct flag value
  • %duckyzones_region_spawn_flag_priority_build% - priority used by the direct flag value

Region ids are matched case-insensitively. If a region id contains hyphens, underscores are also accepted in placeholders, so main-spawn can be used as main_spawn.

Native DuckyZones message placeholders include %player%, %player_uuid%, %world%, %x%, %y%, %z%, %block_x%, %block_y%, %block_z%, %region%, %regions%, %region_count%, and %priority%. Region-scoped placeholders use the same syntax without the PlaceholderAPI identifier, for example %region_spawn_priority%, %region_spawn_flag_build%, or %region_spawn%.


Plugin API

Other plugins can access DuckyZones through the Bukkit service or the convenience provider:

import pl.barpad.duckyzones.api.DuckyZonesApi;
import pl.barpad.duckyzones.api.DuckyZonesProvider;

DuckyZonesApi api = DuckyZonesProvider.get();
boolean insideRegion = api.isInsideRegion(player.getLocation());
String currentRegion = api.getPrimaryRegionAt(player.getLocation())
        .map(region -> region.getId())
        .orElse("");

The same API is also available through Bukkit services:

DuckyZonesApi api = Bukkit.getServicesManager().load(DuckyZonesApi.class);

Use depend: [DuckyZones] or softdepend: [DuckyZones] in your plugin.yml, depending on whether your plugin can run without DuckyZones.

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Comment Command Block

价格:0 墨喵币
下载量:0

查看详情
Booklet

价格:0 墨喵币
下载量:0

查看详情
Quartermaster Pro

价格:0 墨喵币
下载量:0

查看详情
Scythe-Able Mace

价格:0 墨喵币
下载量:0

查看详情