Files
src
build.gradle
Code
16 963
src/main/java/com/customlootdrops/CustomLootDrops.java
package com.customlootdrops;
import com.customlootdrops.command.LootDropCommand;
import com.customlootdrops.listener.DropInteractListener;
import com.customlootdrops.manager.ConfigManager;
import com.customlootdrops.manager.LootManager;
import com.customlootdrops.manager.MessageManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
@Getter
public class CustomLootDrops extends JavaPlugin {
private ConfigManager configManager;
private MessageManager messageManager;
private LootManager lootManager;
@Override
public void onEnable() {
this.configManager = new ConfigManager(this);
this.configManager.loadConfigs();
this.messageManager = new MessageManager(this);
this.lootManager = new LootManager(this);
getCommand("lootdrop").setExecutor(new LootDropCommand(this));
Bukkit.getPluginManager().registerEvents(new DropInteractListener(this), this);
this.lootManager.startCleanupTask();
getLogger().info("CustomLootDrops has been enabled!");
}
@Override
public void onDisable() {
if (this.lootManager != null) {
this.lootManager.removeAllDrops();
}
getLogger().info("CustomLootDrops has been disabled!");
}
}