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.

how to cancel item move

Discussion in 'Skript' started by dudle, Feb 12, 2018.

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

    dudle Active Member

    Joined:
    Jan 31, 2017
    Messages:
    135
    Likes Received:
    0
    how can I deny the move of the items I have in my hotbar? I know how to do that in a gui, but not like in the hotbar. Any syntax please?
     
  2. Code (Skript):
    1. on tool change:
    2.    cancel event
    3.  
    Maybe?
     
  3. dudle

    dudle Active Member

    Joined:
    Jan 31, 2017
    Messages:
    135
    Likes Received:
    0
    nope, not working
     
  4. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    1,016
    Likes Received:
    62
    Skellet has a hotbar switch event you can cancel.
     
  5. dudle

    dudle Active Member

    Joined:
    Jan 31, 2017
    Messages:
    135
    Likes Received:
    0
    It's literally the same as the one above, I want to cancel item switching, not the hotbar slot indicator switch or whatever it's called
     
  6. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    58
    Code (Skript):
    1. on inventory click:
    2.     if name of player's current inventory is "name of gui":
    3.         if clicked slot is 10:
    4.             cancel event
    5.         else if clicked item is stone:
    6.             cancel event
     
  7. dudle

    dudle Active Member

    Joined:
    Jan 31, 2017
    Messages:
    135
    Likes Received:
    0
    Iwant to cancel item move in player's inventory, and not in a gui they currently have opened.
     
  8. Hykz

    Hykz Member

    Joined:
    May 8, 2017
    Messages:
    28
    Likes Received:
    3
    Code (Skript):
    1. on inventory click:
    2.     cancel event
     
  9. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    I think he means offhand switch

    Code (Skript):
    1. On offhand move:
    2.    Cancel event
    --- Double Post Merged, Feb 14, 2018, Original Post Date: Feb 14, 2018 ---
    Or you take THE example of @ChisleLP but in stead of player's current inventory you use player's inventory
     
Thread Status:
Not open for further replies.

Share This Page

Loading...