Solved Prevent right clicking spawners with mob egg

  • 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!

junebirds

Member
Jan 14, 2020
3
0
0
29
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!
 
Last edited:
why would i mark it solved if its not solved
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:
on right click on spawner:
     if player's tool is a 385:
          cancel event
          send "&c&lSERVER &8>> &cYou do not have permission to commit this action."
 
Last edited:
read the original post don't read this quote ok thanks :emoji_grinning:

Code:
on right click on spawner:
   player is holding any spawn egg 
   player does not have permission "mdfspawner"
   cancel event

very simple[/QUOTE]
[doublepost=1581416782,1581416636][/doublepost]
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:
on right click on spawner:
     if player's tool is a 385:
          cancel event
          send "&c&lSERVER &8>> &cYou do not have permission to commit this action."
Vidrio's code is useless as support for item IDs were dropped almost TWO YEARS AGO.