Class SpawnerKillerEvent
java.lang.Object
xyz.geik.farmer.modules.spawnerkiller.handlers.SpawnerKillerEvent
- All Implemented Interfaces:
org.bukkit.event.Listener
Spawner Killer Listener
- Since:
- 1.0.0
- Author:
- poyraz
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
killCalculator
(@NotNull org.bukkit.entity.Entity entity, int amount) Kill calculator for experience and drops minecraft calculates the experience and drops for mobs and animals when they die with a cause.void
onCreatureEvent
(@NotNull org.bukkit.event.entity.CreatureSpawnEvent e) Cancel spawn event if the entity is a jockey or mounted Because jockey and mounted entities can't kill after spawningvoid
onSpawnerSpawnEvent
(org.bukkit.event.entity.SpawnerSpawnEvent e) Spawner spawn event This event is called when a mob is spawned from a spawner
-
Constructor Details
-
SpawnerKillerEvent
public SpawnerKillerEvent()Constructor of class
-
-
Method Details
-
onCreatureEvent
public void onCreatureEvent(@NotNull @NotNull org.bukkit.event.entity.CreatureSpawnEvent e) Cancel spawn event if the entity is a jockey or mounted Because jockey and mounted entities can't kill after spawning- Parameters:
e
- of creature spawn event
-
onSpawnerSpawnEvent
public void onSpawnerSpawnEvent(org.bukkit.event.entity.SpawnerSpawnEvent e) Spawner spawn event This event is called when a mob is spawned from a spawner- Parameters:
e
- of spawner spawn event
-
killCalculator
public static void killCalculator(@NotNull @NotNull org.bukkit.entity.Entity entity, int amount) Kill calculator for experience and drops minecraft calculates the experience and drops for mobs and animals when they die with a cause. This is a custom method to calculate because there is no cause to kill them.- Parameters:
entity
- of entityamount
- of spawn amount
-