improved component structure
This commit is contained in:
parent
79de05fb84
commit
258bfc00c3
@ -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
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user