Class SpawnerKillerEvent

java.lang.Object
xyz.geik.farmer.modules.spawnerkiller.handlers.SpawnerKillerEvent
All Implemented Interfaces:
org.bukkit.event.Listener

public class SpawnerKillerEvent extends Object implements org.bukkit.event.Listener
Spawner Killer Listener
Since:
1.0.0
Author:
poyraz
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor of class
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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 spawning
    void
    onSpawnerSpawnEvent(org.bukkit.event.entity.SpawnerSpawnEvent e)
    Spawner spawn event This event is called when a mob is spawned from a spawner

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 entity
      amount - of spawn amount