1. 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 comminuty!

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

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cancel event is not working when throwing stacks of items

Discussion in 'Skript' started by PantherBoy, Jul 25, 2021.

Thread Status:
Not open for further replies.
  1. PantherBoy

    PantherBoy Active Member

    Joined:
    Jul 20, 2017
    Messages:
    74
    Likes Received:
    0
    Hello, i have an issue with this code:
    Code (Text):
    1. on drop:
    2.     player is holding lapis block named "<cyan><bold>Mana":
    3.         cancel event
    If i press q (the key that drops the items), the code works perfectly, and nothing happens.
    If i press ctrl+q, all of the lapis drops to the ground, so the code doesn't work.
    If in the inventory i hover the lapis block and press q, the code removes 1 lapis block.
    If in the inventory i hover the lapis block and press ctrl+q, the code removes all of the lapis.

    I want to prevent dorping the block, but the code doesn't work properly.

    Skript Version: Skript v2.6-beta2
    Minecraft Version: 1.17
     
  2. WilliamAfton

    WilliamAfton New Member

    Joined:
    Jul 26, 2021
    Messages:
    5
    Likes Received:
    1
    Hello there, you can try:

    Code (Text):
    1. on drop:
    2.     event-item is a lapis block named "<cyan><bold>Mana":
    3.         cancel event
     
  3. PantherBoy

    PantherBoy Active Member

    Joined:
    Jul 20, 2017
    Messages:
    74
    Likes Received:
    0
    It's almost the same, but now if in the inventory i hover the lapis block and press ctrl+q, all the lapis drops to the ground.
     
  4. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Maybe there is an issue with color codes, I don't get why people use <cyan><bold> instead of &b&l or §b§l
     
  5. WilliamAfton

    WilliamAfton New Member

    Joined:
    Jul 26, 2021
    Messages:
    5
    Likes Received:
    1
    this might work.

    Code (Text):
    1. on drop:
    2.     event-item is a 64 lapis block named "&b&lMana":
    3.         cancel event
     
Thread Status:
Not open for further replies.

Share This Page

Loading...