Solved Skript Issue(s)

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

PlutoFR

Member
Dec 8, 2024
3
0
1
Hey! So, just getting started with skript. I've made a (somewhat) decent skript, but there's a bug which expands into 2.
The issue I'm facing is with a custom menu using compass with a custom command with "servers"
I have added a few slots for different minigames, which all are fine except one. "slot 22" with "format slot 22 of player with bed"
It works as intended at the start, It warps me to my designated location. However, 2 bugs occur one of which is: if I do /hub again while in the new world, it does NOT show the item 22 "bed" however slot 22 is still clickable. it ALSO does NOT show my new hotbar from deluxemenus (I have disabled that plugin in the hub world) but on disconnect using the button, it shows whats supposed to be in the new world is being shown in the hub world

Any help?
 
can you provide the script or segments that are causing the error.
Skript:
Code:
command servers:
    aliases: server
    trigger:
        if event-world is "mainworld":
            wait a tick
            open chest with 5 rows named "&e&lServers" to player     
            format slot 22 of player with bed named "&e✔ &c&lBedWars &e✔" with lore "&e(&c!&e)&m--------------&e(&c!&e)||||&8● &7Status &aOnline||||&8● &7Click To Connect||||&e(&c!&e)&m--------------&e(&c!&e)" to close then run [clear player's inventory]->[run player command "mvtp bedwarlobby" as op]->[send player title "&cBedwars" with subtitle "&e✚✚✚✚✚✚" for 5 seconds]

Skript 2
Code:
command quickplay:
    trigger:
        if event-world is "bedwarlobby":
            open chest inventory with 1 row named "&7&lPlay" to player
            set slot 1 of player's current inventory to bed named "&a&lSolo" with lore "&fSolo Bedwars||&7(1V1V1V1V1V1V1V1)||&7(Left-Click to play)"
            set slot 3 of player's current inventory to bed named "&a&lDoubles" with lore "&fDoubles Bedwars||&7(2V2V2V2V2V2V2V2)||&7(Left-Click to play)"
            set slot 5 of player's current inventory to bed named "&a&lTrios" with lore "&fTrios Bedwars||&7(3V3V3V3)||&7(Left-Click to play)"
            set slot 7 of player's current inventory to bed named "&a&lSquads" with lore "&fSquads Bedwars||&7(4V4V4V4)||&7(Left-Click to play)"
        else:
            send "&cCommand unkown"

on inventory click:
    set slot 1 of player to compass named "&ePlay"  
    if inventory name of player's current inventory is "&7&lPlay":
        cancel event
        if player's world is "bedwars_world": # Replace with your desired world name
            if clicked slot is 1:
                execute console command "bw join Solo %player%"
                close player's inventory
            if clicked slot is 3:
                execute console command "bw join Doubles %player%"
                close player's inventory
            if clicked slot is 5:
                execute console command "bw join Trios %player%"
                close player's inventory
            if clicked slot is 7:
                execute console command "bw join Squads %player%"
                close player's inventory
        else:
            close player's inventory
            send "&cCommand unkown"

Skript 3
Code:
command /hub:
    trigger:
        if event-world is "world":
            send "&7&lYou are already in hub"
        if event-world is "bedwarlobby":   
            clear player's inventory
            wait 0.1 seconds
            run player command "mvtp world" as op
            send player title "&c&lHUB" with subtitle "&e✚✚✚✚✚✚" for 5 seconds   
            wait 3 ticks
            clear player's inventory
            set slot 0 of player to compass named "&e&lServers"   
            set slot 8 of player to ender_chest named "&e&lGadgets"
 
Last edited: