diff --git a/src/main/java/org/kapelle/hardcore_revive/PlayerDeathListener.java b/src/main/java/org/kapelle/hardcore_revive/DropHead.java similarity index 88% rename from src/main/java/org/kapelle/hardcore_revive/PlayerDeathListener.java rename to src/main/java/org/kapelle/hardcore_revive/DropHead.java index bb748c4..b2d5efe 100644 --- a/src/main/java/org/kapelle/hardcore_revive/PlayerDeathListener.java +++ b/src/main/java/org/kapelle/hardcore_revive/DropHead.java @@ -11,11 +11,12 @@ import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.SkullMeta; import org.bukkit.plugin.java.JavaPlugin; -public class PlayerDeathListener implements Listener { +public class DropHead implements Listener { private JavaPlugin plugin; - public PlayerDeathListener(JavaPlugin plugin){ + public DropHead(JavaPlugin plugin){ this.plugin = plugin; + plugin.getServer().getPluginManager().registerEvents(this, plugin); } @EventHandler diff --git a/src/main/java/org/kapelle/hardcore_revive/HardcoreRevive.java b/src/main/java/org/kapelle/hardcore_revive/HardcoreRevive.java index 7d2ac84..3962afa 100644 --- a/src/main/java/org/kapelle/hardcore_revive/HardcoreRevive.java +++ b/src/main/java/org/kapelle/hardcore_revive/HardcoreRevive.java @@ -3,10 +3,12 @@ package org.kapelle.hardcore_revive; import org.bukkit.plugin.java.JavaPlugin; public class HardcoreRevive extends JavaPlugin { + DropHead dropHead; @Override public void onEnable() { this.getLogger().info("hardcore-revive plugin enabled"); - this.getServer().getPluginManager().registerEvents(new PlayerDeathListener(this), this); + + dropHead = new DropHead(this); } } \ No newline at end of file