zyrokill2.0
📎 1 file 4,412 chars
📄
pasted-code-1775665254499.txt
txt 131 lines
▶
options:
    prefix: &6[Youtuber SMP]

# =========================
# JOIN SYSTEM
# =========================
on join:
    send title "&eWelcome to" with subtitle "&6Youtuber SMP" to player

    if {subs::%player%} is not set:
        set {subs::%player%} to 0

    # Border system
    if {smp.started} is true:
        set world border of player's world to 10000
    else:
        set world border of player's world to 20

    applyNameTag(player)

    # BossBar
    set {_bar} to bossbar with title "&aYOUTUBER &bSMP"
    add player to {_bar}
    set color of {_bar} to green
    set progress of {_bar} to 1

# =========================
# SUBS COMMAND
# =========================
command /subs  :
    permission: op
    trigger:
        if arg-2 > 100000000000:
            send "&cMax limit reached!"
            stop

        set {subs::%arg-1%} to arg-2
        applyNameTag(arg-1)
        send "{@prefix} &aSubs updated!"

# =========================
# SMP START COMMAND
# =========================
command /smp :
    permission: op
    trigger:
        if arg-1 is "start":

            set {smp.started} to true

            broadcast "&6YOUTUBER SMP STARTED!"

            loop all players:
                send title "&6YOUTUBER SMP" with subtitle "&eDAY 1" to loop-player
                give randomBook() to loop-player

            set world border of world "world" to 10000

            wait 30 minutes
            broadcast "&cPvP ENABLED!"

# =========================
# BOOKSMP COMMAND
# =========================
command /booksmp  [] []:
    permission: op
    trigger:

        # GIVE BOOK
        if arg-1 is "give":
            if arg-2 is set:
                set {_book} to arg-3
                give book named "%{_book}%" to arg-2
                send "&aGave %{_book}% to %arg-2%"
            else:
                send "&cUsage: /booksmp give player bookname"

        # MENU
        if arg-1 is "menu":

            open chest with 3 rows named "&6BOOK SMP MENU" to player

            # Books
            format slot 0 of player with book named "&cFire Book"
            format slot 1 of player with book named "&bWater Book"
            format slot 2 of player with book named "&fWind Book"
            format slot 3 of player with book named "&2Earth Book"
            format slot 4 of player with book named "&eLightning Book"
            format slot 5 of player with book named "&5Shadow Book"
            format slot 6 of player with book named "&6Light Book"
            format slot 7 of player with book named "&bIce Book"
            format slot 8 of player with book named "&2Poison Book"
            format slot 9 of player with book named "&dMind Book"
            format slot 10 of player with book named "&6Time Book"
            format slot 11 of player with book named "&bSpeed Book"
            format slot 12 of player with book named "&9Defense Book"
            format slot 13 of player with book named "&cStrength Book"
            format slot 14 of player with book named "&5Void Book"

# =========================
# INVENTORY GUI CLICK
# =========================
on inventory click:
    if name of event-inventory is "&6BOOK SMP MENU":
        cancel event

        if clicked item is not air:
            set {_name} to name of clicked item
            give book named "%{_name}%" to player
            send "&aYou got %{_name}%!"

# =========================
# RANDOM BOOK
# =========================
function randomBook() :: item:
    set {_books::*} to "Fire Book", "Water Book", "Wind Book", "Earth Book", "Lightning Book", "Shadow Book", "Light Book", "Ice Book", "Poison Book", "Mind Book", "Time Book", "Speed Book", "Defense Book", "Strength Book", "Void Book"

    set {_name} to random element out of {_books::*}
    return book named "%{_name}%"

# =========================
# NAMETAG SYSTEM
# =========================
function applyNameTag(p: player):
    set {_subs} to {subs::%{_p}%}
    set {_team} to "subs_%{_p}%"

    execute console command "team add %{_team}%"
    execute console command "team join %{_team}% %{_p}%"
    execute console command "team modify %{_team}% prefix \"&f\""
    execute console command "team modify %{_team}% suffix \" &a[SUBS: %{_subs}%]\""
Kodari AI
KodariApr 8 at 4:58 pm 8,584 (v2)

I’ll convert this Skript code into a comprehensive Java plugin for a YouTuber SMP system.

YouTuberSMP
A YouTuber-themed SMP plugin featuring subscriber count tracking with scoreboard integration, 15 unique ability books with GUI selector, world border management, automated SMP start system with PvP timer, welcome titles, and persistent bossbars. Perfect for content creator servers with subscriber-based ranking systems and custom book abilities.

All files created! The plugin includes:

  • Subscriber tracking system with scoreboard team integration showing sub counts

  • 15 unique ability books (Fire, Water, Wind, Earth, Lightning, Shadow, Light, Ice, Poison, Mind, Time, Speed, Defense, Strength, Void)

  • Dynamic world border (20 blocks pre-start, 10,000 after)

  • SMP start system with random book distribution and 30-minute PvP timer

  • Welcome system with titles and persistent green bossbars

  • Admin commands for managing subs, starting SMP, and distributing books

  • Interactive GUI for book selection with click handling

zyrokill2.0
📎 1 file 3,055 chars
📄
pasted-code-1775666303425.txt
txt 87 lines
▶
# =========================
# SAFE BOOK ABILITIES
# =========================
on right click:
    if player is sneaking:
        if player's tool is a book:

            set {_name} to name of player's tool

            # FIRE BOOK
            if {_name} is "&cFire Book" or {_name} contains "Fire Book":
                launch fireball from player
                send "&c🔥 Fireball used!"

            # WATER BOOK
            if {_name} contains "Water Book":
                push player forward at speed 1
                send "&b💧 Water push!"

            # WIND BOOK
            if {_name} contains "Wind Book":
                push player upwards at speed 1
                send "&f🌪️ Jump boost!"

            # EARTH BOOK
            if {_name} contains "Earth Book":
                apply resistance 2 to player for 5 seconds
                send "&2🌍 Defense active!"

            # LIGHTNING BOOK
            if {_name} contains "Lightning Book":
                strike lightning at target block
                send "&e⚡ Lightning!"

            # SHADOW BOOK
            if {_name} contains "Shadow Book":
                apply invisibility 1 to player for 5 seconds
                send "&5🌑 Invisible!"

            # LIGHT BOOK
            if {_name} contains "Light Book":
                heal player
                send "&6✨ Heal!"

            # ICE BOOK
            if {_name} contains "Ice Book":
                if targeted entity is a player:
                    apply slowness 3 to targeted entity for 5 seconds
                    send "&b❄️ Enemy frozen!"

            # POISON BOOK
            if {_name} contains "Poison Book":
                if targeted entity is a player:
                    apply poison 2 to targeted entity for 5 seconds
                    send "&2☠️ Poisoned!"

            # MIND BOOK
            if {_name} contains "Mind Book":
                if targeted entity is a player:
                    apply nausea 2 to targeted entity for 5 seconds
                    send "&d🧠 Confused!"

            # TIME BOOK
            if {_name} contains "Time Book":
                loop all players in radius 5 around player:
                    apply slowness 5 to loop-player for 3 seconds
                send "&6⏳ Time slowed!"

            # SPEED BOOK
            if {_name} contains "Speed Book":
                apply speed 2 to player for 8 seconds
                send "&b💨 Speed!"

            # DEFENSE BOOK
            if {_name} contains "Defense Book":
                apply resistance 3 to player for 8 seconds
                send "&9🛡️ Shield!"

            # STRENGTH BOOK
            if {_name} contains "Strength Book":
                apply strength 2 to player for 8 seconds
                send "&c🗡️ Power!"

            # VOID BOOK
            if {_name} contains "Void Book":
                teleport player to location 5 blocks in front of player
                send "&5🌌 Teleport!"
Kodari AI
KodariApr 8 at 5:15 pm 13,136 (v2)

I’ll read the existing project files to understand the structure, then create a book ability system.

I’ll create a book ability listener that implements all the abilities from the Skript code.

Now I need to register the listener in the main plugin class:

Book ability system implemented. All 15 book types now have working abilities triggered by sneaking + right-clicking with the book.

zyrokill2.0
📎 1 file 6,483 chars
📄
pasted-code-1775667266911.txt
txt 213 lines
▶
options:
    prefix: &6[Youtuber SMP]

# =========================
# JOIN SYSTEM
# =========================
on join:
    send title "&eWelcome to" with subtitle "&6Youtuber SMP" to player

    if {subs::%player%} is not set:
        set {subs::%player%} to 0

    if {smp.started} is true:
        set world border of player's world to 10000
    else:
        set world border of player's world to 20

    applyNameTag(player)

    set {_bar} to bossbar with title "&aYOUTUBER &bSMP"
    add player to {_bar}
    set color of {_bar} to green
    set progress of {_bar} to 1

# =========================
# SUBS COMMAND
# =========================
command /subs  :
    permission: op
    trigger:
        set {subs::%arg-1%} to arg-2
        applyNameTag(arg-1)

# =========================
# SMP START
# =========================
command /smp :
    permission: op
    trigger:
        if arg-1 is "start":
            set {smp.started} to true
            broadcast "&6YOUTUBER SMP STARTED!"

            loop all players:
                send title "&6YOUTUBER SMP" with subtitle "&eDAY 1" to loop-player
                give randomBook() to loop-player

            set world border of world "world" to 10000

# =========================
# BOOK MENU
# =========================
command /booksmp :
    permission: op
    trigger:
        if arg-1 is "menu":

            open chest with 3 rows named "&6BOOK SMP MENU" to player

            format slot 0 of player with fireBook()
            format slot 1 of player with waterBook()
            format slot 2 of player with windBook()
            format slot 3 of player with earthBook()
            format slot 4 of player with lightningBook()
            format slot 5 of player with shadowBook()
            format slot 6 of player with lightBook()
            format slot 7 of player with iceBook()
            format slot 8 of player with poisonBook()
            format slot 9 of player with mindBook()
            format slot 10 of player with timeBook()
            format slot 11 of player with speedBook()
            format slot 12 of player with defenseBook()
            format slot 13 of player with strengthBook()
            format slot 14 of player with voidBook()

# =========================
# INVENTORY GUI CLICK
# =========================
on inventory click:
    if name of event-inventory is "&6BOOK SMP MENU":
        cancel event
        if clicked item is not air:
            give clicked item to player

# =========================
# BOOK FUNCTIONS (WITH LORE)
# =========================
function fireBook() :: item:
    set {_i} to book named "Fire Book"
    set lore of {_i} to "&7Shift+Right: Fireball", "&7Shift+Left: Lightning"
    return {_i}

function waterBook() :: item:
    set {_i} to book named "Water Book"
    set lore of {_i} to "&7Push", "&7Water Breathing"
    return {_i}

function windBook() :: item:
    set {_i} to book named "Wind Book"
    set lore of {_i} to "&7Jump", "&7Dash"
    return {_i}

function earthBook() :: item:
    set {_i} to book named "Earth Book"
    set lore of {_i} to "&7Resistance", "&7Regen"
    return {_i}

function lightningBook() :: item:
    set {_i} to book named "Lightning Book"
    set lore of {_i} to "&7Strike", "&7Speed"
    return {_i}

function shadowBook() :: item:
    set {_i} to book named "Shadow Book"
    set lore of {_i} to "&7Invisible", "&7Teleport"
    return {_i}

function lightBook() :: item:
    set {_i} to book named "Light Book"
    set lore of {_i} to "&7Heal", "&7Heal All"
    return {_i}

function iceBook() :: item:
    set {_i} to book named "Ice Book"
    set lore of {_i} to "&7Freeze", "&7Slow"
    return {_i}

function poisonBook() :: item:
    set {_i} to book named "Poison Book"
    set lore of {_i} to "&7Poison", "&7Wither"
    return {_i}

function mindBook() :: item:
    set {_i} to book named "Mind Book"
    set lore of {_i} to "&7Nausea", "&7Blindness"
    return {_i}

function timeBook() :: item:
    set {_i} to book named "Time Book"
    set lore of {_i} to "&7Slow All", "&7Slow Fall"
    return {_i}

function speedBook() :: item:
    set {_i} to book named "Speed Book"
    set lore of {_i} to "&7Speed", "&7Dash"
    return {_i}

function defenseBook() :: item:
    set {_i} to book named "Defense Book"
    set lore of {_i} to "&7Shield", "&7Absorption"
    return {_i}

function strengthBook() :: item:
    set {_i} to book named "Strength Book"
    set lore of {_i} to "&7Strength", "&7Power"
    return {_i}

function voidBook() :: item:
    set {_i} to book named "Void Book"
    set lore of {_i} to "&7Teleport", "&7Invisible"
    return {_i}

# =========================
# RANDOM BOOK
# =========================
function randomBook() :: item:
    set {_books::*} to fireBook(), waterBook(), windBook(), earthBook(), lightningBook(), shadowBook(), lightBook(), iceBook(), poisonBook(), mindBook(), timeBook(), speedBook(), defenseBook(), strengthBook(), voidBook()
    return random element out of {_books::*}

# =========================
# ABILITIES (2 PER BOOK)
# =========================
on right click:
    if player is sneaking:
        if player's tool is a book:
            set {_name} to name of player's tool

            if {_name} contains "Fire Book":
                launch fireball from player

            if {_name} contains "Void Book":
                teleport player to location 6 blocks in front of player

on left click:
    if player is sneaking:
        if player's tool is a book:
            set {_name} to name of player's tool

            if {_name} contains "Fire Book":
                strike lightning at target block

            if {_name} contains "Void Book":
                apply invisibility 1 to player for 5 seconds

# =========================
# PVP SYSTEM
# =========================
command /pvp :
    permission: op
    trigger:
        if arg-1 is "enable":
            set {pvp.enabled} to true
            broadcast "&c⚔ PvP ENABLED!"

        if arg-1 is "disable":
            set {pvp.enabled} to false
            broadcast "&a🛡 PvP DISABLED!"

on damage:
    if victim is a player:
        if attacker is a player:
            if {pvp.enabled} is not true:
                cancel event
Kodari AI
KodariApr 8 at 5:32 pm 21,207 (v2)

I’ll read all the existing files to understand what’s already implemented, then help complete the conversion from Skript to Bukkit.

I can see the plugin is already mostly implemented, but there are some missing features from the Skript:

Analysis:

  • LEFT CLICK abilities are missing (Skript has 2 abilities per book)

  • Book lore doesn’t show ability descriptions

  • PVP enable/disable system is missing

  • Some abilities don’t match the Skript exactly

Let me complete the implementation:

All features from the Skript have been successfully converted to Java:

  • ✅ All 15 book types with unique abilities

  • ✅ TWO abilities per book (right-click + left-click while sneaking)

  • ✅ Book lore showing both abilities

  • ✅ Join system with title, subs initialization, world border, nametag, bossbar

  • ✅ /subs command to set subscriber counts

  • ✅ /smp start command with broadcasts and random book distribution

  • ✅ /booksmp menu command for book selection GUI

  • ✅ /pvp enable/disable command

  • ✅ PVP damage protection when disabled

zyrokill2.0
📎 1 file 6,578 chars
📄
pasted-code-1775757980067.txt
txt 235 lines
▶
options:
    prefix: &6[Youtuber SMP]

# =========================
# FIRST JOIN
# =========================
on first join:
    send title "&eWelcome to" with subtitle "&6Youtuber SMP" to player
    give randomBook() to player

# =========================
# JOIN (NO RESET + GIVE BOOK IF NEEDED)
# =========================
on join:
    if {smp.started} is true:
        set world border of player's world to 10000

        if player does not have a book:
            give randomBook() to player

# =========================
# SMP START
# =========================
command /smp start:
    permission: op
    trigger:
        set {smp.started} to true
        broadcast "&6YOUTUBER SMP STARTED!"

        set world border of world "world" to 10000

        loop all players:
            open chest with 1 row named "&6Spinning Book..." to loop-player

            loop 5 times:
                format slot 4 of loop-player with randomBook()
                wait 10 ticks

            set {_book} to randomBook()
            format slot 4 of loop-player with {_book}

            wait 10 ticks
            close loop-player's inventory

            give {_book} to loop-player

# =========================
# BOOK MENU
# =========================
command /booksmp menu:
    permission: op
    trigger:
        open chest with 3 rows named "&6BOOK SMP MENU" to player

        format slot 0 of player with fireBook()
        format slot 1 of player with waterBook()
        format slot 2 of player with windBook()
        format slot 3 of player with earthBook()
        format slot 4 of player with lightningBook()
        format slot 5 of player with shadowBook()
        format slot 6 of player with lightBook()
        format slot 7 of player with iceBook()
        format slot 8 of player with poisonBook()
        format slot 9 of player with mindBook()
        format slot 10 of player with timeBook()
        format slot 11 of player with speedBook()
        format slot 12 of player with defenseBook()
        format slot 13 of player with strengthBook()
        format slot 14 of player with voidBook()

on inventory click:
    if name of event-inventory is "&6BOOK SMP MENU":
        cancel event
        if clicked item is not air:
            give clicked item to player

# =========================
# BOOK FUNCTIONS
# =========================
function fireBook() :: item:
    set {_i} to book named "Fire Book"
    return {_i}

function waterBook() :: item:
    set {_i} to book named "Water Book"
    return {_i}

function windBook() :: item:
    set {_i} to book named "Wind Book"
    return {_i}

function earthBook() :: item:
    set {_i} to book named "Earth Book"
    return {_i}

function lightningBook() :: item:
    set {_i} to book named "Lightning Book"
    return {_i}

function shadowBook() :: item:
    set {_i} to book named "Shadow Book"
    return {_i}

function lightBook() :: item:
    set {_i} to book named "Light Book"
    return {_i}

function iceBook() :: item:
    set {_i} to book named "Ice Book"
    return {_i}

function poisonBook() :: item:
    set {_i} to book named "Poison Book"
    return {_i}

function mindBook() :: item:
    set {_i} to book named "Mind Book"
    return {_i}

function timeBook() :: item:
    set {_i} to book named "Time Book"
    return {_i}

function speedBook() :: item:
    set {_i} to book named "Speed Book"
    return {_i}

function defenseBook() :: item:
    set {_i} to book named "Defense Book"
    return {_i}

function strengthBook() :: item:
    set {_i} to book named "Strength Book"
    return {_i}

function voidBook() :: item:
    set {_i} to book named "Void Book"
    return {_i}

function randomBook() :: item:
    set {_list::*} to fireBook(), waterBook(), windBook(), earthBook(), lightningBook(), shadowBook(), lightBook(), iceBook(), poisonBook(), mindBook(), timeBook(), speedBook(), defenseBook(), strengthBook(), voidBook()
    return random element out of {_list::*}

# =========================
# COOLDOWN
# =========================
function checkCooldown(p: player) :: boolean:
    if {cooldown::%{_p}%} is set:
        if difference between now and {cooldown::%{_p}%} < 10 seconds:
            send "&c⏳ Ability on cooldown!" to {_p}
            return false
    return true

function setCooldown(p: player):
    set {cooldown::%{_p}%} to now

# =========================
# ABILITIES
# =========================
on right click:
    if player is sneaking:
        if player's tool is a book:
            set {_n} to name of player's tool

            if checkCooldown(player) is false:
                stop

            if {_n} contains "Fire Book":
                play sound "entity.blaze.shoot" at player
                spawn 20 flame at player
                launch fireball from player

            if {_n} contains "Ice Book":
                spawn 20 snowflake at player
                apply slowness 3 to player for 5 seconds

            if {_n} contains "Poison Book":
                spawn 20 spell at player
                apply poison 2 to player for 5 seconds

            if {_n} contains "Mind Book":
                spawn 20 portal at player
                apply nausea 2 to player for 5 seconds

            if {_n} contains "Time Book":
                loop all players in radius 5 around player:
                    apply slowness 5 to loop-player for 3 seconds

            setCooldown(player)

on left click:
    if player is sneaking:
        if player's tool is a book:
            set {_n} to name of player's tool

            if checkCooldown(player) is false:
                stop

            if {_n} contains "Fire Book":
                strike lightning at target block

            if {_n} contains "Ice Book":
                apply slowness 5 to player for 3 seconds

            if {_n} contains "Poison Book":
                apply wither 1 to player for 5 seconds

            if {_n} contains "Mind Book":
                apply blindness 2 to player for 5 seconds

            if {_n} contains "Time Book":
                apply slow falling 1 to player for 5 seconds

            setCooldown(player)

# =========================
# PVP SYSTEM
# =========================
command /pvp enable:
    permission: op
    trigger:
        set {pvp} to true
        send title "&cPVP ENABLED" to all players

command /pvp disable:
    permission: op
    trigger:
        set {pvp} to false
        send title "&aPVP DISABLED" to all players

on damage:
    attacker is a player
    victim is a player
    if {pvp} is not true:
        cancel event
Kodari AI
KodariApr 9 at 6:11 pm 47,373 (v2)

I’ll read all existing files to understand the current implementation and complete the functionality to match the Skript.

I’ll analyze the Skript and implement the missing features in the Java plugin, particularly the cooldown system, particle effects, first join mechanics, and the spinning book animation.

I’ll implement the missing features from the Skript: cooldown system, particle effects, first join mechanics, and the spinning book animation.

All features from the Skript have been implemented: cooldown system with 10-second duration, particle effects for all book abilities, first join book giving, spinning book animation on SMP start, and proper join mechanics with book checking.

zyrokill2.0
📎 1 file 6,504 chars
📄
pasted-code-1775895269316.txt
txt 206 lines
▶
options:
    prefix: &6[Youtuber SMP]

# =========================
# SERVER LOAD → 20 BORDER
# =========================
on load:
    set world border of world "world" to 20

# =========================
# FIRST JOIN ONLY
# =========================
on first join:
    send title "&eWelcome to" with subtitle "&6Youtuber SMP" to player
    give randomBook() to player

# =========================
# JOIN (NO RESET)
# =========================
on join:
    if {smp.started} is true:
        set world border of player's world to 10000

# =========================
# SMP START
# =========================
command /smp start:
    permission: op
    trigger:
        set {smp.started} to true
        broadcast "&6YOUTUBER SMP STARTED!"

        set world border of world "world" to 10000

        loop all players:
            open chest with 1 row named "&6Spinning Book..." to loop-player

            loop 5 times:
                format slot 4 of loop-player with randomBook()
                wait 10 ticks

            set {_book} to randomBook()
            format slot 4 of loop-player with {_book}

            wait 10 ticks
            close loop-player's inventory

            give {_book} to loop-player

        wait 1 second
        send title "&6YOUTUBER SMP" with subtitle "&aDAY 1" to all players

        set {bossbar} to true

# =========================
# BOSSBAR ANIMATION
# =========================
every 2 seconds:
    if {bossbar} is true:
        loop all players:
            send bossbar "&aYOUTUBER SMP" with progress 1 to loop-player
            wait 5 ticks
            send bossbar "&bYOUTUBER SMP" with progress 1 to loop-player
            wait 5 ticks
            send bossbar "&6YOUTUBER SMP" with progress 1 to loop-player

# =========================
# BOOK FUNCTIONS
# =========================
function fireBook() :: item: return book named "Fire Book"
function waterBook() :: item: return book named "Water Book"
function windBook() :: item: return book named "Wind Book"
function earthBook() :: item: return book named "Earth Book"
function lightningBook() :: item: return book named "Lightning Book"
function shadowBook() :: item: return book named "Shadow Book"
function lightBook() :: item: return book named "Light Book"
function iceBook() :: item: return book named "Ice Book"
function poisonBook() :: item: return book named "Poison Book"
function mindBook() :: item: return book named "Mind Book"
function timeBook() :: item: return book named "Time Book"
function speedBook() :: item: return book named "Speed Book"
function defenseBook() :: item: return book named "Defense Book"
function strengthBook() :: item: return book named "Strength Book"
function voidBook() :: item: return book named "Void Book"

function randomBook() :: item:
    set {_list::*} to fireBook(), waterBook(), windBook(), earthBook(), lightningBook(), shadowBook(), lightBook(), iceBook(), poisonBook(), mindBook(), timeBook(), speedBook(), defenseBook(), strengthBook(), voidBook()
    return random element out of {_list::*}

# =========================
# COOLDOWN SYSTEM
# =========================
function checkCooldown(p: player) :: boolean:
    if {cooldown::%{_p}%} is set:
        if difference between now and {cooldown::%{_p}%} < 10 seconds:
            send "&c⏳ Ability on cooldown!" to {_p}
            return false
    return true

function setCooldown(p: player):
    set {cooldown::%{_p}%} to now

# =========================
# ABILITIES (ALL WORKING)
# =========================
on right click:
    if player is sneaking:
        if player's tool is a book:
            set {_n} to name of player's tool
            if checkCooldown(player) is false:
                stop

            if {_n} is "Fire Book":
                play sound "entity.blaze.shoot"
                spawn 20 flame at player
                launch fireball from player

            else if {_n} is "Water Book":
                apply water breathing 1 to player for 10 seconds

            else if {_n} is "Wind Book":
                push player upwards at speed 1.5

            else if {_n} is "Earth Book":
                apply resistance 2 to player for 6 seconds

            else if {_n} is "Lightning Book":
                strike lightning at target block

            else if {_n} is "Shadow Book":
                apply invisibility 1 to player for 5 seconds

            else if {_n} is "Light Book":
                heal player

            else if {_n} is "Ice Book":
                apply slowness 3 to player for 5 seconds

            else if {_n} is "Poison Book":
                apply poison 2 to player for 5 seconds

            else if {_n} is "Mind Book":
                apply nausea 2 to player for 5 seconds

            else if {_n} is "Time Book":
                loop all players in radius 5:
                    apply slowness 5 to loop-player for 3 seconds

            else if {_n} is "Speed Book":
                apply speed 3 to player for 6 seconds

            else if {_n} is "Defense Book":
                apply resistance 3 to player for 6 seconds

            else if {_n} is "Strength Book":
                apply strength 2 to player for 6 seconds

            else if {_n} is "Void Book":
                teleport player to location 6 blocks in front of player

            setCooldown(player)

on left click:
    if player is sneaking:
        if player's tool is a book:
            set {_n} to name of player's tool
            if checkCooldown(player) is false:
                stop

            if {_n} is "Fire Book":
                strike lightning at target block

            else if {_n} is "Ice Book":
                apply slowness 5 to player for 3 seconds

            else if {_n} is "Poison Book":
                apply wither 1 to player for 5 seconds

            else if {_n} is "Mind Book":
                apply blindness 2 to player for 5 seconds

            else if {_n} is "Time Book":
                apply slow falling 1 to player for 5 seconds

            setCooldown(player)

# =========================
# PVP SYSTEM
# =========================
command /pvp enable:
    permission: op
    trigger:
        set {pvp} to true
        send title "&cPVP ENABLED" to all players

command /pvp disable:
    permission: op
    trigger:
        set {pvp} to false
        send title "&aPVP DISABLED" to all players

on damage:
    attacker is a player
    victim is a player
    if {pvp} is not true:
        cancel event
zyrokill2.0
📎 1 file 6,504 chars
📄
pasted-code-1775974954588.txt
txt 206 lines
▶
options:
    prefix: &6[Youtuber SMP]

# =========================
# SERVER LOAD → 20 BORDER
# =========================
on load:
    set world border of world "world" to 20

# =========================
# FIRST JOIN ONLY
# =========================
on first join:
    send title "&eWelcome to" with subtitle "&6Youtuber SMP" to player
    give randomBook() to player

# =========================
# JOIN (NO RESET)
# =========================
on join:
    if {smp.started} is true:
        set world border of player's world to 10000

# =========================
# SMP START
# =========================
command /smp start:
    permission: op
    trigger:
        set {smp.started} to true
        broadcast "&6YOUTUBER SMP STARTED!"

        set world border of world "world" to 10000

        loop all players:
            open chest with 1 row named "&6Spinning Book..." to loop-player

            loop 5 times:
                format slot 4 of loop-player with randomBook()
                wait 10 ticks

            set {_book} to randomBook()
            format slot 4 of loop-player with {_book}

            wait 10 ticks
            close loop-player's inventory

            give {_book} to loop-player

        wait 1 second
        send title "&6YOUTUBER SMP" with subtitle "&aDAY 1" to all players

        set {bossbar} to true

# =========================
# BOSSBAR ANIMATION
# =========================
every 2 seconds:
    if {bossbar} is true:
        loop all players:
            send bossbar "&aYOUTUBER SMP" with progress 1 to loop-player
            wait 5 ticks
            send bossbar "&bYOUTUBER SMP" with progress 1 to loop-player
            wait 5 ticks
            send bossbar "&6YOUTUBER SMP" with progress 1 to loop-player

# =========================
# BOOK FUNCTIONS
# =========================
function fireBook() :: item: return book named "Fire Book"
function waterBook() :: item: return book named "Water Book"
function windBook() :: item: return book named "Wind Book"
function earthBook() :: item: return book named "Earth Book"
function lightningBook() :: item: return book named "Lightning Book"
function shadowBook() :: item: return book named "Shadow Book"
function lightBook() :: item: return book named "Light Book"
function iceBook() :: item: return book named "Ice Book"
function poisonBook() :: item: return book named "Poison Book"
function mindBook() :: item: return book named "Mind Book"
function timeBook() :: item: return book named "Time Book"
function speedBook() :: item: return book named "Speed Book"
function defenseBook() :: item: return book named "Defense Book"
function strengthBook() :: item: return book named "Strength Book"
function voidBook() :: item: return book named "Void Book"

function randomBook() :: item:
    set {_list::*} to fireBook(), waterBook(), windBook(), earthBook(), lightningBook(), shadowBook(), lightBook(), iceBook(), poisonBook(), mindBook(), timeBook(), speedBook(), defenseBook(), strengthBook(), voidBook()
    return random element out of {_list::*}

# =========================
# COOLDOWN SYSTEM
# =========================
function checkCooldown(p: player) :: boolean:
    if {cooldown::%{_p}%} is set:
        if difference between now and {cooldown::%{_p}%} < 10 seconds:
            send "&c⏳ Ability on cooldown!" to {_p}
            return false
    return true

function setCooldown(p: player):
    set {cooldown::%{_p}%} to now

# =========================
# ABILITIES (ALL WORKING)
# =========================
on right click:
    if player is sneaking:
        if player's tool is a book:
            set {_n} to name of player's tool
            if checkCooldown(player) is false:
                stop

            if {_n} is "Fire Book":
                play sound "entity.blaze.shoot"
                spawn 20 flame at player
                launch fireball from player

            else if {_n} is "Water Book":
                apply water breathing 1 to player for 10 seconds

            else if {_n} is "Wind Book":
                push player upwards at speed 1.5

            else if {_n} is "Earth Book":
                apply resistance 2 to player for 6 seconds

            else if {_n} is "Lightning Book":
                strike lightning at target block

            else if {_n} is "Shadow Book":
                apply invisibility 1 to player for 5 seconds

            else if {_n} is "Light Book":
                heal player

            else if {_n} is "Ice Book":
                apply slowness 3 to player for 5 seconds

            else if {_n} is "Poison Book":
                apply poison 2 to player for 5 seconds

            else if {_n} is "Mind Book":
                apply nausea 2 to player for 5 seconds

            else if {_n} is "Time Book":
                loop all players in radius 5:
                    apply slowness 5 to loop-player for 3 seconds

            else if {_n} is "Speed Book":
                apply speed 3 to player for 6 seconds

            else if {_n} is "Defense Book":
                apply resistance 3 to player for 6 seconds

            else if {_n} is "Strength Book":
                apply strength 2 to player for 6 seconds

            else if {_n} is "Void Book":
                teleport player to location 6 blocks in front of player

            setCooldown(player)

on left click:
    if player is sneaking:
        if player's tool is a book:
            set {_n} to name of player's tool
            if checkCooldown(player) is false:
                stop

            if {_n} is "Fire Book":
                strike lightning at target block

            else if {_n} is "Ice Book":
                apply slowness 5 to player for 3 seconds

            else if {_n} is "Poison Book":
                apply wither 1 to player for 5 seconds

            else if {_n} is "Mind Book":
                apply blindness 2 to player for 5 seconds

            else if {_n} is "Time Book":
                apply slow falling 1 to player for 5 seconds

            setCooldown(player)

# =========================
# PVP SYSTEM
# =========================
command /pvp enable:
    permission: op
    trigger:
        set {pvp} to true
        send title "&cPVP ENABLED" to all players

command /pvp disable:
    permission: op
    trigger:
        set {pvp} to false
        send title "&aPVP DISABLED" to all players

on damage:
    attacker is a player
    victim is a player
    if {pvp} is not true:
        cancel event
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
20 1,347
src/main/java/com/youtuber/smp/YouTuberSMP.java
package com.youtuber.smp;

import com.youtuber.smp.command.BookSMPCommand;
import com.youtuber.smp.command.PVPCommand;
import com.youtuber.smp.command.SMPCommand;
import com.youtuber.smp.command.SubsCommand;
import com.youtuber.smp.listener.BookAbilityListener;
import com.youtuber.smp.listener.GUIListener;
import com.youtuber.smp.listener.JoinListener;
import com.youtuber.smp.listener.PVPListener;
import com.youtuber.smp.manager.BookManager;
import com.youtuber.smp.manager.NameTagManager;
import com.youtuber.smp.manager.PVPManager;
import com.youtuber.smp.manager.SMPManager;
import com.youtuber.smp.manager.CooldownManager;
import com.youtuber.smp.manager.SubsManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class YouTuberSMP extends JavaPlugin {

    private SubsManager subsManager;
    private BookManager bookManager;
    private NameTagManager nameTagManager;
    private SMPManager smpManager;
    private PVPManager pvpManager;
    private CooldownManager cooldownManager;

    @Override
    public void onEnable() {
        this.subsManager = new SubsManager();
        this.bookManager = new BookManager();
        this.nameTagManager = new NameTagManager(this);
        this.smpManager = new SMPManager(this);
        this.pvpManager = new PVPManager();
        this.cooldownManager = new CooldownManager();

        getCommand("subs").setExecutor(new SubsCommand(this));
        getCommand("smp").setExecutor(new SMPCommand(this));
        getCommand("booksmp").setExecutor(new BookSMPCommand(this));
        getCommand("pvp").setExecutor(new PVPCommand(this));

        getServer().getPluginManager().registerEvents(new JoinListener(this), this);
        getServer().getPluginManager().registerEvents(new GUIListener(this), this);
        getServer().getPluginManager().registerEvents(new BookAbilityListener(this), this);
        getServer().getPluginManager().registerEvents(new PVPListener(this), this);

        getLogger().info("YouTuberSMP has been enabled!");
    }

    @Override
    public void onDisable() {
        smpManager.cleanup();
        getLogger().info("YouTuberSMP has been disabled!");
    }
}