Files
src
pom.xml
Code
22 1,557
src/main/java/com/git/gitplugin/GitPlugin.java
package com.git.gitplugin;
import com.git.gitplugin.commands.GitCommand;
import com.git.gitplugin.commands.GitOzelAdminCommand;
import com.git.gitplugin.commands.GitOzelCommand;
import com.git.gitplugin.config.ConfigManager;
import com.git.gitplugin.data.PlayerDataManager;
import com.git.gitplugin.data.PublicTeleportManager;
import com.git.gitplugin.gui.GUIListener;
import com.git.gitplugin.listener.PlayerMoveListener;
import com.git.gitplugin.teleport.TeleportManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
public class GitPlugin extends JavaPlugin {
private ConfigManager configManager;
private PublicTeleportManager publicTeleportManager;
private PlayerDataManager playerDataManager;
private TeleportManager teleportManager;
@Override
public void onEnable() {
getDataFolder().mkdirs();
this.configManager = new ConfigManager(this);
this.publicTeleportManager = new PublicTeleportManager(this);
this.playerDataManager = new PlayerDataManager(this);
this.teleportManager = new TeleportManager(this);
GitCommand gitCommand = new GitCommand(this);
getCommand("git").setExecutor(gitCommand);
getCommand("git").setTabCompleter(gitCommand);
GitOzelCommand gitOzelCommand = new GitOzelCommand(this);
getCommand("gitozel").setExecutor(gitOzelCommand);
getCommand("gitozel").setTabCompleter(gitOzelCommand);
GitOzelAdminCommand gitOzelAdminCommand = new GitOzelAdminCommand(this);
getCommand("gitozeladmin").setExecutor(gitOzelAdminCommand);
getCommand("gitozeladmin").setTabCompleter(gitOzelAdminCommand);
Bukkit.getPluginManager().registerEvents(new GUIListener(), this);
Bukkit.getPluginManager().registerEvents(new PlayerMoveListener(this), this);
getLogger().info("GitTeleport başarıyla etkinleştirildi!");
}
@Override
public void onDisable() {
getLogger().info("GitTeleport devre dışı bırakıldı!");
}
public ConfigManager cfg() {
return configManager;
}
public PublicTeleportManager getPublicTeleportManager() {
return publicTeleportManager;
}
public PlayerDataManager getPlayerDataManager() {
return playerDataManager;
}
public TeleportManager getTeleportManager() {
return teleportManager;
}
}