Dateien nach "src/main/java/me/viper/teamplugin" hochladen
This commit is contained in:
39
src/main/java/me/viper/teamplugin/Main.java
Normal file
39
src/main/java/me/viper/teamplugin/Main.java
Normal file
@@ -0,0 +1,39 @@
|
||||
package me.viper.teamplugin;
|
||||
|
||||
import me.viper.teamplugin.commands.TeamCommand;
|
||||
import me.viper.teamplugin.gui.SettingsGUI;
|
||||
import me.viper.teamplugin.listener.InventoryListener;
|
||||
import me.viper.teamplugin.manager.DataManager;
|
||||
import me.viper.teamplugin.manager.LangManager;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class Main extends JavaPlugin {
|
||||
|
||||
private static Main instance;
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
instance = this;
|
||||
|
||||
saveDefaultConfig(); // config.yml kopieren
|
||||
saveResource("lang.yml", false); // lang.yml kopieren falls nicht vorhanden
|
||||
|
||||
LangManager.setup();
|
||||
DataManager.setup();
|
||||
|
||||
getCommand("team").setExecutor(new TeamCommand());
|
||||
getServer().getPluginManager().registerEvents(new InventoryListener(), this);
|
||||
|
||||
getLogger().info("TeamPlugin aktiviert.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
DataManager.save();
|
||||
getLogger().info("TeamPlugin deaktiviert.");
|
||||
}
|
||||
|
||||
public static Main getInstance() {
|
||||
return instance;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user