_reincarnat1on

i WANT A MINECRAFT SKRIPT LIKE THIS:

a skript

you can like get a wand

and select an area

and in that area

you can double jump

like for spawn

or lobby or hub Comand is //zinwand for the selection want, left click selects the first position , right click the 2nd position and then they run the command /doublejump after szelecting both areas, then in that selected area u can double jump.

messages: Invalid position selection ( if they didnt select correzctly) and hjust come up with more, i have skbee and skript installed on 1.21.11 paper

Kodari AI
KodariJul 4 at 8:08 pm 3

I’ll create a double jump zone system for your hub/lobby server.

DoubleJumpArea
Allows staff to define zones where players can double jump. Uses a wand tool to select cuboid regions, then enables a double jump mechanic inside those areas. Features cooldown, particle effects, sounds, and cleanup on leave. Supports area management through list and remove commands. Built with Skript and SkBee for Minecraft 1.21.1 Paper.
Kodari can make mistakes. Review important code before using.
Files
DoubleJumpArea.sk
Code
1 306
DoubleJumpArea.sk
# ═══════════════════════════════════════════════════════════════
# DoubleJumpArea.sk — Double jump zones for hub/lobby servers
# ═══════════════════════════════════════════════════════════════
#
# Commands:
#   //zinwand           - Get the area selection wand
#   /doublejump         - Create area from wand selection
#   /doublejump list    - List all double jump areas
#   /doublejump remove <id> - Remove a double jump area
#
# Features:
#   - Wand-based area selection (left = pos1, right = pos2)
#   - Players in marked areas can double jump (space in air)
#   - Cooldown system to prevent spam
#   - Particle and sound effects
#   - Staff bypass permission for creative/fly
#
# Requirements:
#   - Skript 2.6+
#   - SkBee (for cuboid support)
#
# ═══════════════════════════════════════════════════════════════

options:
    # ── General ──
    prefix: "&8[&bᴅᴊ&8]&r"

    # ── Wand Settings ──
    wand_item: blaze_rod
    wand_name: "&b&l✦ Selection Wand"
    wand_lore: "&7Left = &fPos 1 &8| &7Right = &fPos 2 &8| &e/doublejump"

    # ── Double Jump Settings ──
    boost_power: 1.3
    cooldown_seconds: 2

    # ── Messages ──
    msg_wand_given: "&aYou received the &bSelection Wand&a!"
    msg_wand_help: "&eLeft-click &7= Pos 1 &8| &eRight-click &7= Pos 2 &8| &e/doublejump &7= Create area"
    msg_pos1: "&a✓ &7Position &a#1 &7set"
    msg_pos2: "&a✓ &7Position &a#2 &7set"
    msg_ready: "&eNow run &b/doublejump &eto create the area!"
    msg_no_pos1: "&c✗ &7Position &a#1 &7not selected! &eUse &b//zinwand &7to get the wand."
    msg_no_pos2: "&c✗ &7Position &a#2 &7not selected! &eUse &b//zinwand &7to get the wand."
    msg_area_created: "&a✔ &7Double jump area &a#%id% &7created! &8(%size% blocks)"
    msg_area_removed: "&c✗ &7Area &c#%id% &7removed!"
    msg_no_permission: "&c✗ &7You don't have permission!"
    msg_double_jump: "&b⬆ &7Double jump!"
    msg_cooldown: "&c⏳ &7Wait %time%s before double jumping again!"
    msg_entered: "&b✦ &7You can now &bdouble jump&7!"
    msg_left: "&c✦ &7Double jump disabled."
    msg_from_ground: "&c✗ &7Jump first, then press space again in the air!"
    msg_no_areas: "&cThere are no double jump areas."
    msg_area_list: "&6&lDouble Jump Areas:"
    msg_area_entry: "&7#%id% &8- &7%world% &8[&7%size% blocks&8]"
    msg_invalid_id: "&c✗ &7Invalid area ID!"
    msg_usage: "&cUsage: &7/doublejump remove <id>"
    msg_list_empty: "&7No areas defined yet."

    # ── Effects ──
    sound_boost: entity_player_levelup


# ══════════════════════════════════════════════
# STARTUP — reset all player flight states
# ══════════════════════════════════════════════

on script load:
    loop all players:
        set allow flight of loop-player to false
        set flying of loop-player to false
        delete {dbjump::inzone::%loop-player%}
        delete {dbjump::cooldown::%loop-player%}
        delete {dbjump::wand::%loop-player%}
        delete {dbjump::wand::%loop-player%::pos1}
        delete {dbjump::wand::%loop-player%::pos2}
    broadcast "{@prefix} &aDouble jump system loaded!"


# ══════════════════════════════════════════════
# COMMANDS
# ══════════════════════════════════════════════

command //zinwand:
    permission: doublejump.admin
    aliases: //wand, /zw
    trigger:
        set {dbjump::wand::%player%} to true
        give player 1 {@wand_item} named "{@wand_name}" with lore "{@wand_lore}"
        send "{@prefix} {@msg_wand_given}" to player
        send "{@prefix} {@msg_wand_help}" to player

command /doublejump [<text>] [<integer>]:
    permission: doublejump.admin
    aliases: /dj
    trigger:
        # ── Create new area from wand selection ──
        if arg-1 is not set:
            {dbjump::wand::%player%::pos1} is not set:
                send "{@prefix} {@msg_no_pos1}" to player
                stop

            {dbjump::wand::%player%::pos2} is not set:
                send "{@prefix} {@msg_no_pos2}" to player
                stop

            # Get next available ID
            {dbjump::nextid} is not set
            set {dbjump::nextid} to 1

            set {_id} to {dbjump::nextid}
            set {dbjump::area::%{_id}%::pos1} to {dbjump::wand::%player%::pos1}
            set {dbjump::area::%{_id}%::pos2} to {dbjump::wand::%player%::pos2}

            # Calculate block size
            set {_p1} to {dbjump::wand::%player%::pos1}
            set {_p2} to {dbjump::wand::%player%::pos2}
            set {_dx} to abs(x coord of {_p1} - x coord of {_p2}) + 1
            set {_dz} to abs(z coord of {_p1} - z coord of {_p2}) + 1
            set {_dy} to abs(y coord of {_p1} - y coord of {_p2}) + 1
            set {_size} to {_dx} * {_dy} * {_dz}

            # Add to area list
            add {_id} to {dbjump::arealist::*}

            # Send message with dynamic values
            send "{@prefix} &a✔ &7Double jump area &a#%{_id}% &7created! &8(%{_size}% blocks)" to player

            # Clean up wand selection
            delete {dbjump::wand::%player%::pos1}
            delete {dbjump::wand::%player%::pos2}

            # Increment ID for next area
            add 1 to {dbjump::nextid}

        # ── List all areas ──
        else if arg-1 is "list":
            {dbjump::arealist::*} is empty:
                send "{@prefix} {@msg_no_areas}" to player
                stop

            send "{@prefix} {@msg_area_list}" to player
            loop {dbjump::arealist::*}:
                set {_id} to loop-value
                set {_p1} to {dbjump::area::%{_id}%::pos1}
                set {_p2} to {dbjump::area::%{_id}%::pos2}
                {_p1} is not set
                next loop

                set {_w} to world of {_p1}
                set {_dx} to abs(x coord of {_p1} - x coord of {_p2}) + 1
                set {_dz} to abs(z coord of {_p1} - z coord of {_p2}) + 1
                set {_dy} to abs(y coord of {_p1} - y coord of {_p2}) + 1
                set {_size} to {_dx} * {_dy} * {_dz}
                send "{@prefix} &7#%{_id}% &8- &7%{_w}% &8[&7%{_size}% blocks&8]" to player

        # ── Remove an area ──
        else if arg-1 is "remove":
            arg-2 is not set:
                send "{@prefix} {@msg_usage}" to player
                stop

            {dbjump::area::%arg-2%::pos1} is not set:
                send "{@prefix} {@msg_invalid_id}" to player
                stop

            delete {dbjump::area::%arg-2%::pos1}
            delete {dbjump::area::%arg-2%::pos2}
            remove arg-2 from {dbjump::arealist::*}
            send "{@prefix} &c✗ &7Area &c#%arg-2% &7removed!" to player


# ══════════════════════════════════════════════
# WAND SELECTION — left click = pos1, right click = pos2
# ══════════════════════════════════════════════

on left click:
    {dbjump::wand::%player%} is true
    player's tool is blaze rod

    cancel event
    set {dbjump::wand::%player%::pos1} to location of player
    send "{@prefix} {@msg_pos1}" to player

    {dbjump::wand::%player%::pos1} is set
    {dbjump::wand::%player%::pos2} is set
    send "{@prefix} {@msg_ready}" to player

on right click:
    {dbjump::wand::%player%} is true
    player's tool is blaze rod

    cancel event
    set {dbjump::wand::%player%::pos2} to location of player
    send "{@prefix} {@msg_pos2}" to player

    {dbjump::wand::%player%::pos1} is set
    {dbjump::wand::%player%::pos2} is set
    send "{@prefix} {@msg_ready}" to player