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!

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

Solved Prevent right clicking spawners with mob egg

Discussion in 'Requests' started by junebirds, Jan 14, 2020.

  1. junebirds

    junebirds Member

    Joined:
    Jan 14, 2020
    Messages:
    3
    Likes Received:
    0
    Category: ?

    Suggested name: {Skript}PreventMobEggSpawner

    Spigot/Skript Version: 1.15.1

    What I want:
    script that causes the cancelling of a right click event on any mob spawner if the player is holding any egg. I solved preventing the event from happening, but I'm having trouble with the game still outputting that I have successfully turned the spawner into a chicken spawner for example and would like help on getting rid of this

    Ideas for commands:
    none necessary

    Ideas for permissions:
    none necessary but a preventmobeggspawner.override would be nice

    When I'd like it by:

    anytime!

     
    #1 junebirds, Jan 14, 2020
    Last edited: Jan 14, 2020
  2. Best Answer:
    Post #8 by JaydenBee, Feb 11, 2020
  3. Vidrio_

    Vidrio_ Member

    Joined:
    Jan 6, 2020
    Messages:
    3
    Likes Received:
    0
    try this:
    on right click:
    if event block is "spawner":
    cancel event
    message "&cNOPE!"
     
  4. Zabrid

    Supporter

    Joined:
    Mar 2, 2019
    Messages:
    54
    Likes Received:
    1
    Please mark this as solved if the issue is solved.
     
  5. junebirds

    junebirds Member

    Joined:
    Jan 14, 2020
    Messages:
    3
    Likes Received:
    0
    if it was solved sure
     
  6. Zabrid

    Supporter

    Joined:
    Mar 2, 2019
    Messages:
    54
    Likes Received:
    1
    No, you have to mark the thread as solved, you can do this by clicking "edit" under the original post and set the tag as "solved"
     
  7. junebirds

    junebirds Member

    Joined:
    Jan 14, 2020
    Messages:
    3
    Likes Received:
    0
    why would i mark it solved if its not solved
     
  8. Zabrid

    Supporter

    Joined:
    Mar 2, 2019
    Messages:
    54
    Likes Received:
    1
    How was it not solved? I believe Vidrio solved your issue

    Also:
    After some experimentation if you're using silk spawners doing this is impossible but if you're using any other spawner plugin this code should work

    Code (Text):
    1.  
    2. on right click on spawner:
    3.      if player's tool is a 385:
    4.           cancel event
    5.           send "&c&lSERVER &8>> &cYou do not have permission to commit this action."
     
    #7 Zabrid, Feb 4, 2020
    Last edited: Feb 4, 2020
  9. JaydenBee

    JaydenBee Member

    Joined:
    Nov 11, 2019
    Messages:
    36
    Likes Received:
    2
    Code (Text):
    1. on right click on spawner:
    2.    player is holding any spawn egg
    3.    player does not have permission "mdfspawner"
    4.    cancel event
    very simple[/QUOTE]
    --- Double Post Merged, Feb 11, 2020, Original Post Date: Feb 11, 2020 ---
    Vidrio's code is useless as support for item IDs were dropped almost TWO YEARS AGO.
     

Share This Page

Loading...