Skript

Skript

743k Downloads

Rigth Click Event

jugandomiguel opened this issue ยท 4 comments

commented

Skript/Server Version

[16:44:56 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[16:44:56 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[16:44:56 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[16:44:56 INFO]: [Skript] Server Version: 1.21.1-85-c5a1066 (MC: 1.21.1)
[16:44:56 INFO]: [Skript] Skript Version: 2.9.4 (skriptlang-github)
[16:44:56 INFO]: [Skript] Installed Skript Addons:
[16:44:56 INFO]: [Skript]  - skript-yaml v1.5
[16:44:56 INFO]: [Skript]  - skript-reflect v2.5.1 (https://github.com/SkriptLang/skript-reflect)
[16:44:56 INFO]: [Skript]  - SkBee v3.6.1 (https://github.com/ShaneBeee/SkBee)
[16:44:56 INFO]: [Skript]  - ItemsAdder v4.0.2-beta-release-11 (devs.beer)
[16:44:56 INFO]: [Skript] Installed dependencies:
[16:44:56 INFO]: [Skript]  - WorldGuard v7.0.12+829a4a4

Bug Description

I made a chair system, when you right click on a chair the right click event is not being called when you are on a specific area, and if you are in without op won't work

on any right click:
    broadcast "&bstart"
    if event-block is {@chair_material}:
        broadcast "&bPassed all"
        set {_arena::positions::*} to expand_area({arena::position::1}, {arena::position::2})
        set {_arena::pos1} to {_arena::positions::1}
        set {_arena::pos2} to {_arena::positions::2}
        if event-player is within {_arena::pos1} and {_arena::pos2}:
            broadcast "&5Region Check"
            # if event-block is {game::material}:
            if event-player isn't riding a interaction:
                broadcast "&5Is riding?"
                if {chair::location::%event-player's uuid%} isn't set:
                    broadcast "&5isn't set player chair"
                    cancel event
                    spawn interaction at (event-block's location)# ~~ vector(0,-2,0))
                    make the event-player ride the last spawned entity
                    create_chair_states_variable(event-player, last spawned entity, event-block)
        else if {@allow_chairs_use} is true:
            broadcast "&6Allow player use"
            if event-player isn't riding a interaction:
                broadcast "&6Is riding?"
                if {chair::location::%event-player's uuid%} isn't set:
                    broadcast "&6isn't set player chair"
                    cancel event
                    spawn interaction at (event-block's location)# ~~ vector(0,-2,0))
                    make the event-player ride the last spawned entity
                    create_chair_states_variable(event-player, last spawned entity, event-block)

https://streamable.com/q72a9v

Expected Behavior

the right click event being called

Steps to Reproduce

I don't have any clue, I removed all the code that is not necesarry for the chairs to work and still were bugged

Errors or Screenshots

No response

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
commented

This is not a Skript bug, this is likely just vanilla spawn protection in action.

commented

I have no vanilla protection enabled

commented

Then you have a separate plugin or similar that's cancelling the click event
you can listen to cancelled events if you want. Either way, there's no bug here

commented

I fixed it, tysm