Skip to content

on right click of: does not support offhand, and cancelling events is broken #1808

Description

@TsCode1

Description

There are 2 bugs. For one, "on right click of" does not include offhand. This can cause huge exploits on a lot of servers that are using this trigger and should be fixed.
the second bug is even worse because it completely breaks all cancel events and requires a server restart, just ruins the server completely
2, when cancelling 2 events at the same time that are on the same script, then skript breaks and cancels the event continuously without a trigger.

Steps to Reproduce

  1. on rightclick holding a egg: cancel event will not cancel event when right clicking on offhand.

  2. to reproduce second bug, have these 2 things for example: `on rightclick holding a egg:
    if player does not have permission "egg.use":
    send "no 1."
    cancel event

on rightclick holding a bow:
if player does not have permission "bow.use":
send "no 2"
cancel event`

try rightclicking them both at the same time (or put one item in your offhand and right click twice and it will break immedietly) and then it will stop checking the permission and will not send a message, but will rather just cancel the event forever and u cant use the items in any way, cant even break blocks with them.

Expected Behavior

I expected for right click trigger to include offhand ( there is no other offhand support) and I expected cancelling events to not leak and break the server completely by ruining the items

Errors / Screenshots

will do if necessary, the bugs are clear

Server Information

  • Server version/platform:
  • Skript version:
    `[16:03:54 INFO]: This server is running Paper version git-Paper-1593 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT)
    [16:03:54 INFO]: You are 2 version(s) behind

ver skript
[16:04:00 INFO]: [MyCmd] This command have ADD_PERMISSIONS type
[16:04:00 INFO]: Skript version 2.3.1
[16:04:00 INFO]: Customize Minecraft's mechanics with simple scripts written in plain English sentences.
[16:04:00 INFO]: Website: https://skriptlang.github.io/Skript
[16:04:00 INFO]: Authors: Njol, Mirreski, bensku, TheBentoBox, Snow-Pyon, Pikachu920, Nicofisi, tim740, Tuke-Nuke, TheLimeGlass, xXAndrew28Xx, Sashie, RoyCurtis, nfell2009, Syst3ms and Blueyescat`

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn issue that needs to be fixed. Alternatively, a PR fixing an issue.completedThe issue has been fully resolved and the change will be in the next Skript update.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions