[1.13.x] EventHandler


#1

EventHandler is a simple plugin that allows server Owners/Admins to cancel specific events on their server that may not be supported by other plugins.

I thought of this idea when I came across a few random threads where members were looking to cancel some small events, like entities crushing turtle eggs, tab complete, filling buckets, and so much more.

This plugin currently has a small list of events that you can cancel simply by setting the cancel to true in the config. Ive split it up into 4 main categories, Block Events, Server Events, Entity Events and Player Events. All of the player events have an option to send a message to the player when they attempt said event, as well as bypass permissions. Some of the events will require Paper since their API includes a lot more things. (If you are on this site, you probably already have Paper high five)

If you have ideas for more events for me to add, I am all ears. I would like to make this plugin more extensive so bring on those ideas.

Everything is off by default.
Download: Click the release image at the top

EVENTS:

SERVER EVENTS:

Tab Complete - Blocks players from using the tab complete functions.
Lightning Strike - Prevents lightning from striking

ENTITY EVENTS:

Pig Zap - Prevents lightning striking pigs and turning them into Pigmen
Enter Boat - Prevents entities (other than players) from entering boats [ NEW ]
Enter Minecart - Prevents entities (other than players) from entering Minecarts [ NEW ]
Spawner Spawn - Prevents mobs from spawning from spawners
Turtle Egg Trample - Prevents entities (I think only zombies do this) from trampling turtle eggs [ NOTE: Requires latest build of Spigot 1.13.2 as of Nov 12/2018 or Paper 1.13.2 build #442 ]
Turtle Lay Eggs - Prevents turtles from laying eggs as they walk around [ Requires Paper ]
Skeleton Trap - Prevents Skeleton Traps from spawning more skeleton horses / skeletons when a player gets near. [ Requires Paper ]
Witch Throw Potion - Prevents witches from throwing potions at players [ Requires Paper ]

BLOCK EVENTS:

Anvil Break - Prevents anvils from breaking [ Requires Paper ]
Dispense - Prevents dispensers from dispensing items
Form - Prevents blocks from forming ( Examples: Snow forming due to a snow storm, Ice forming in a snowy Biome like Taiga or Tundra, Obsidian / Cobblestone forming due to contact with water, Concrete forming due to mixing of concrete powder and water.)
Leaf Decay - Prevents leaves from decaying
Sponge Absorb - Prevents sponges from absorbing water

PLAYER EVENTS:

Breeding - Prevents players from breeding animals
Bucket Fill - Prevents players from filling buckets
Bucket Empty - Prevents players from emptying buckets
Consume Potion - Prevents players from consuming potions [ NEW ]
Consume Milk - Prevents players from consuming milk [ NEW ]
Creative Inventory Drop - Prevents players whom are in creative mode from dropping items on the ground (Useful if you don’t want creative players to give items to survival players)
Drop Item - Prevents players from dropping items on the ground
Enter Bed - Prevents players from entering beds
Fishing - Prevents players from fishing [ NEW ]
Jump - Prevents players from jumping [ Requires Paper ]
Tame - Prevents players from taming animals
Thrown Egg Spawn Chickens - Prevents chickens spawning when a player throws an egg
Throw Egg - Prevents players from throwing eggs [ NEW ]
Throw Snowball - Prevents players from throwing snowballs [ NEW ]
Toggle Sprinting - Prevents players from toggling sprinting [ NEW ]
Trample Crops - Prevents players from trampling crops
Trample Turtle Eggs - Prevents players from trampling turtle eggs (#SaveTheTurtles)

COMMANDS & PERMISSIONS:

COMMANDS:

A short list of commands

  • /EventHandler about - Tiny bit of info about the plugin
  • /EventHandler reload - Reloads the config after you make changes
    Both of these commands have the alias /eh

PERMISSIONS:

  • eventhandler.admin - Permission to use the /eh <about/reload> commands
  • eventhandler.bypass.* - Bypass all cancelled PLAYER events
  • eventhandler.bypass.breed - Bypasses the cancelled player breed event
  • eventhandler.bypass.bucketfill - Bypasses the cancelled player bucket fill event
  • eventhandler.bypass.bucketempty - Bypasses the cancelled player bucket empty event
  • eventhandler.bypass.consumemilk - Bypasses the cancelled player consume milk event
  • eventhandler.bypass.consumepotion - Bypasses the cancelled player consume potion event
  • eventhandler.bypass.creativeinvdrop - Bypasses the cancelled player creative inventory drop event
  • eventhandler.bypass.dropitem - Bypasses the cancelled player drop item event
  • eventhandler.bypass.enterbedevent - Bypasses the cancelled player enter bed event
  • eventhandler.bypass.fishing - Bypasses the cancelled player fishing event
  • eventhandler.bypass.jump - Bypasses the cancelled player jump event
  • eventhandler.bypass.tabcomplete - Bypasses the cancelled tab complete event
  • eventhandler.bypass.tame - Bypasses the cancelled player tame event
  • eventhandler.bypass.throwneggspawnchicken - Bypasses the cancelled player thrown egg spawn chicken event
  • eventhandler.bypass.throwegg - Bypasses the cancelled player throw egg event
  • eventhandler.bypass.throwsnowball - Bypasses the cancelled player throw snowball event
  • eventhandler.bypass.tramplecrops - Bypasses the cancelled player trample crop event
  • eventhandler.bypass.trampleeggs - Bypasses the cancelled player trample turtle egg event

SUPPORT:

  • Reply to this thread Im not sure how often I’ll see the replies, so I recommend using GitHub
  • GitHub , you can post issues on this resource’s GitHub page
  • Discord - I also have a private DISCORD channel for my resource. (Look for the category on the left “Projects-Support”)

Feel free to donate if you would like :slight_smile: Any support helps out


#2

OO an Update… fun!
Version 1.2.0 (Click on the releases button at the top

ADDED:

  • List commands, you can now see all the available events that can be cancelled via a command in game/console. This list will also show what is enable/disabled on your server already. (/EventHandler list <Block/Entity/Player/Server>)
  • Enable/Disable command. Added a command to enable or disable events on your server. This may seem backwards but Enable means setting the config to true which cancels the event, and Disable means setting the config to false which does not cancel the event. (/EventHandler <enable/disable> <Block/Entity/Player/Server> )
  • Tab Completer - Will show all the options for enabling and disabling of events

FIXES:

  • Fixed a missing permission in the plugin.yml

CHANGES:

  • Changed some of the info shown in( /EventHandler about)
  • Changed some of the info at the top of the config.yml file

Tab Complete - Autofills for you in the new enable/disable command

Lists - Showing you all available events that can be cancelled and whether or not they’re enabled/disable in your config