Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.pommeskiwi.main;
- import java.util.HashMap;
- import org.bukkit.entity.Player;
- import org.bukkit.plugin.java.JavaPlugin;
- import me.pommeskiwi.claim.ClaimedChunksFactory;
- import me.pommeskiwi.command.ChatClear;
- import me.pommeskiwi.command.Claim;
- import me.pommeskiwi.command.Discord;
- import me.pommeskiwi.command.FallingBlock;
- import me.pommeskiwi.command.Fly;
- import me.pommeskiwi.command.Gamble;
- import me.pommeskiwi.command.GlobalMute;
- import me.pommeskiwi.command.Help;
- import me.pommeskiwi.command.Kopf;
- import me.pommeskiwi.command.Mute;
- import me.pommeskiwi.command.Rang;
- import me.pommeskiwi.command.SetSpawn;
- import me.pommeskiwi.command.Sozialemedien;
- import me.pommeskiwi.command.Spawn;
- import me.pommeskiwi.command.Tools;
- import me.pommeskiwi.command.Tpa;
- import me.pommeskiwi.command.TpaAccept;
- import me.pommeskiwi.command.VIP;
- import me.pommeskiwi.home.command.DelHome;
- import me.pommeskiwi.home.command.Home;
- import me.pommeskiwi.home.command.HomeList;
- import me.pommeskiwi.home.command.SetHome;
- import me.pommeskiwi.listener.BlockBreak;
- import me.pommeskiwi.listener.BlockPlace;
- import me.pommeskiwi.listener.ChunkUnload;
- import me.pommeskiwi.listener.EntityListener;
- import me.pommeskiwi.listener.InteractListener;
- import me.pommeskiwi.listener.InventoryClickListener;
- import me.pommeskiwi.listener.JoinListener;
- import me.pommeskiwi.listener.PlayerChatEvent;
- import me.pommeskiwi.listener.QuitListener;
- import me.pommeskiwi.listener.SpawnListener;
- import me.pommeskiwi.stats.PlayerStatsFactory;
- import me.pommeskiwi.util.Broadcaster;
- import me.pommeskiwi.warps.WarpCommand;
- import me.pommeskiwi.warps.WarpFactory;
- import me.pommeskiwi.warps.Warps;
- public class Main
- extends JavaPlugin
- {
- public static HashMap<Player, Player> tpa = new HashMap<Player, Player>();
- public static String prefix = "";
- public static String noperm = "";
- public String Mute;
- private boolean globalMute;
- private PlayerStatsFactory playerStatsFactory;
- private ClaimedChunksFactory claimedChunksFactory;
- private WarpFactory warpFactory;
- public void onEnable()
- {
- this.playerStatsFactory = new PlayerStatsFactory();
- this.claimedChunksFactory = new ClaimedChunksFactory(this);
- this.warpFactory = new WarpFactory();
- this.globalMute = false;
- new Broadcaster(this);
- registerCommands();
- registerListener();
- }
- private void registerListener()
- {
- getServer().getPluginManager().registerEvents(new QuitListener(this), this);
- getServer().getPluginManager().registerEvents(new JoinListener(this), this);
- getServer().getPluginManager().registerEvents(new PlayerChatEvent(this), this);
- getServer().getPluginManager().registerEvents(new InteractListener(this), this);
- getServer().getPluginManager().registerEvents(new SpawnListener(), this);
- getServer().getPluginManager().registerEvents(new InventoryClickListener(), this);
- getServer().getPluginManager().registerEvents(new EntityListener(this), this);
- getServer().getPluginManager().registerEvents(new ChunkUnload(), this);
- getServer().getPluginManager().registerEvents(new BlockPlace(this.claimedChunksFactory), this);
- getServer().getPluginManager().registerEvents(new BlockBreak(this.claimedChunksFactory), this);
- getServer().getPluginManager().registerEvents(new Gamble(), this);
- }
- private void registerCommands()
- {
- getCommand("Discord").setExecutor(new Discord());
- getCommand("Help").setExecutor(new Help());
- getCommand("Sozialemedien").setExecutor(new Sozialemedien());
- getCommand("Rank").setExecutor(new Rang());
- getCommand("YouTuber").setExecutor(new VIP());
- getCommand("globalmute").setExecutor(new GlobalMute(this));
- getCommand("mute").setExecutor(new Mute(this));
- getCommand("kopf").setExecutor(new Kopf());
- getCommand("fallingBlock").setExecutor(new FallingBlock());
- getCommand("fly").setExecutor(new Fly(this));
- getCommand("cc").setExecutor(new ChatClear());
- getCommand("tools").setExecutor(new Tools(this));
- getCommand("setspawn").setExecutor(new SetSpawn());
- getCommand("spawn").setExecutor(new Spawn());
- getCommand("home").setExecutor(new Home(this));
- getCommand("delhome").setExecutor(new DelHome(this));
- getCommand("homelist").setExecutor(new HomeList(this));
- getCommand("sethome").setExecutor(new SetHome(this));
- getCommand("warp").setExecutor(new WarpCommand(this.warpFactory));
- getCommand("warps").setExecutor(new Warps(this.warpFactory));
- getCommand("tpa").setExecutor(new Tpa());
- getCommand("tpaccept").setExecutor(new TpaAccept());
- getCommand("spin").setExecutor(new Gamble());
- getCommand("claim").setExecutor(new Claim(this.claimedChunksFactory, this.playerStatsFactory));
- }
- public ClaimedChunksFactory getClaimedChunksFactory()
- {
- return this.claimedChunksFactory;
- }
- public WarpFactory getWarpFactory()
- {
- return this.warpFactory;
- }
- public PlayerStatsFactory getPlayerStatsFactory()
- {
- return this.playerStatsFactory;
- }
- public boolean isGlobalMute()
- {
- return this.globalMute;
- }
- public void setGlobalMute(boolean arg)
- {
- this.globalMute = arg;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement