Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.text.SimpleDateFormat;
- import org.bukkit.Bukkit;
- import org.bukkit.World;
- import org.bukkit.entity.Player;
- import org.bukkit.event.EventHandler;
- import org.bukkit.event.Listener;
- import org.bukkit.event.player.PlayerJoinEvent;
- import org.bukkit.plugin.Plugin;
- import org.bukkit.plugin.PluginManager;
- import org.bukkit.plugin.java.JavaPlugin;
- import org.bukkit.scheduler.BukkitRunnable;
- import org.mcsg.double0negative.tabapi.TabAPI;
- import magiccase.command.CaseCommand;
- import magiccase.listeners.CaseDropListener;
- import magiccase.listeners.CaseKickQuitListener;
- import magiccase.listeners.CasePlaceListener;
- import net.redinginer.core.commands.Command;
- import net.redinginer.core.commands.CommandManager;
- import net.redinginer.core.commands.cmd.AutoMsgCommand;
- import net.redinginer.core.commands.cmd.BCGCommand;
- import net.redinginer.core.commands.cmd.BackupCommand;
- import net.redinginer.core.commands.cmd.BanCommand;
- import net.redinginer.core.commands.cmd.BanIPCommand;
- import net.redinginer.core.commands.cmd.BoyFamerCommand;
- import net.redinginer.core.commands.cmd.ChatCommand;
- import net.redinginer.core.commands.cmd.ClearCommand;
- import net.redinginer.core.commands.cmd.ClearEnderchestCommand;
- import net.redinginer.core.commands.cmd.CobblexCommand;
- import net.redinginer.core.commands.cmd.ConfigCommand;
- import net.redinginer.core.commands.cmd.CraftCommand;
- import net.redinginer.core.commands.cmd.DajYTCommand;
- import net.redinginer.core.commands.cmd.DayCommand;
- import net.redinginer.core.commands.cmd.EfektyCommand;
- import net.redinginer.core.commands.cmd.EggCommand;
- import net.redinginer.core.commands.cmd.EnableCommand;
- import net.redinginer.core.commands.cmd.EnchantCommand;
- import net.redinginer.core.commands.cmd.EnderchestCommand;
- import net.redinginer.core.commands.cmd.FlyCommand;
- import net.redinginer.core.commands.cmd.GamemodeCommand;
- import net.redinginer.core.commands.cmd.GcCommand;
- import net.redinginer.core.commands.cmd.GetSponsorKitCommand;
- import net.redinginer.core.commands.cmd.GiveCommand;
- import net.redinginer.core.commands.cmd.GodCommand;
- import net.redinginer.core.commands.cmd.GroupCommand;
- import net.redinginer.core.commands.cmd.HcCommand;
- import net.redinginer.core.commands.cmd.HeadCommand;
- import net.redinginer.core.commands.cmd.HealCommand;
- import net.redinginer.core.commands.cmd.HelpCommand;
- import net.redinginer.core.commands.cmd.HelpOpCommand;
- import net.redinginer.core.commands.cmd.HomeCommand;
- import net.redinginer.core.commands.cmd.InvCommand;
- import net.redinginer.core.commands.cmd.IsCommand;
- import net.redinginer.core.commands.cmd.ItemCommand;
- import net.redinginer.core.commands.cmd.KickAllCommand;
- import net.redinginer.core.commands.cmd.KickCommand;
- import net.redinginer.core.commands.cmd.KitCommand;
- import net.redinginer.core.commands.cmd.KitsCommand;
- import net.redinginer.core.commands.cmd.LevelCommand;
- import net.redinginer.core.commands.cmd.ListCommand;
- import net.redinginer.core.commands.cmd.NetherCommand;
- import net.redinginer.core.commands.cmd.NightCommand;
- import net.redinginer.core.commands.cmd.PayCommand;
- import net.redinginer.core.commands.cmd.RankingCommand;
- import net.redinginer.core.commands.cmd.RenameCommand;
- import net.redinginer.core.commands.cmd.RepairCommand;
- import net.redinginer.core.commands.cmd.ReplyCommand;
- import net.redinginer.core.commands.cmd.SetHomeCommand;
- import net.redinginer.core.commands.cmd.SetSpawnCommand;
- import net.redinginer.core.commands.cmd.ShopCommand;
- import net.redinginer.core.commands.cmd.SlotCommand;
- import net.redinginer.core.commands.cmd.SlowmodeCommand;
- import net.redinginer.core.commands.cmd.SmietnikCommand;
- import net.redinginer.core.commands.cmd.SpawnCommand;
- import net.redinginer.core.commands.cmd.SpeedCommand;
- import net.redinginer.core.commands.cmd.StatsCommand;
- import net.redinginer.core.commands.cmd.StoneCommand;
- import net.redinginer.core.commands.cmd.StpCommand;
- import net.redinginer.core.commands.cmd.StreamerCommand;
- import net.redinginer.core.commands.cmd.TeleportCommand;
- import net.redinginer.core.commands.cmd.TellCommand;
- import net.redinginer.core.commands.cmd.TpaCommand;
- import net.redinginer.core.commands.cmd.TpacceptCommand;
- import net.redinginer.core.commands.cmd.TpdenyCommmand;
- import net.redinginer.core.commands.cmd.TurboCommand;
- import net.redinginer.core.commands.cmd.UnBanCommand;
- import net.redinginer.core.commands.cmd.UnBanIpCommand;
- import net.redinginer.core.commands.cmd.VanishCommand;
- import net.redinginer.core.commands.cmd.VipCommand;
- import net.redinginer.core.commands.cmd.WhiteListCommand;
- import net.redinginer.core.commands.cmd.WhoIsCommand;
- import net.redinginer.core.commands.cmd.WorkBenchCommand;
- import net.redinginer.core.commands.cmd.YouTubeCommand;
- import net.redinginer.core.commands.cmd.YtlistCommand;
- import net.redinginer.core.commands.guild.AllyCommand;
- import net.redinginer.core.commands.guild.CreateCommand;
- import net.redinginer.core.commands.guild.DeleteCommand;
- import net.redinginer.core.commands.guild.EnlargeCommand;
- import net.redinginer.core.commands.guild.GaCommand;
- import net.redinginer.core.commands.guild.GuildHelpCommand;
- import net.redinginer.core.commands.guild.GuildHomeCommand;
- import net.redinginer.core.commands.guild.GuildSetHomeCommand;
- import net.redinginer.core.commands.guild.InfoCommand;
- import net.redinginer.core.commands.guild.InviteCommand;
- import net.redinginer.core.commands.guild.JoinCommand;
- import net.redinginer.core.commands.guild.LeaderCommand;
- import net.redinginer.core.commands.guild.LeaveCommand;
- import net.redinginer.core.commands.guild.OwnerCommand;
- import net.redinginer.core.commands.guild.ProlongCommand;
- import net.redinginer.core.commands.guild.PvpCommand;
- import net.redinginer.core.configuration.Config;
- import net.redinginer.core.configuration.Lang;
- import net.redinginer.core.listeners.AsyncPlayerChatListener;
- import net.redinginer.core.listeners.BoyListener;
- import net.redinginer.core.listeners.ChatGuildsListener;
- import net.redinginer.core.listeners.CheckLoginListener;
- import net.redinginer.core.listeners.CobblexListener;
- import net.redinginer.core.listeners.DropBlockBreakListener;
- import net.redinginer.core.listeners.EntityDamageByEntityListener;
- import net.redinginer.core.listeners.EntityDamageListener;
- import net.redinginer.core.listeners.EntityDeathListener;
- import net.redinginer.core.listeners.GuildExplodeListener;
- import net.redinginer.core.listeners.InCommbatInGuildListener;
- import net.redinginer.core.listeners.InventoryClickListener;
- import net.redinginer.core.listeners.InventoryListener;
- import net.redinginer.core.listeners.OpenInventoryListener;
- import net.redinginer.core.listeners.PlayerDeathListener;
- import net.redinginer.core.listeners.PlayerInteractListener;
- import net.redinginer.core.listeners.PlayerJoinListener;
- import net.redinginer.core.listeners.PlayerJoinListener1;
- import net.redinginer.core.listeners.PlayerMoveListener;
- import net.redinginer.core.listeners.PlayerQuitJoinListener;
- import net.redinginer.core.listeners.PunchPotyListener;
- import net.redinginer.core.listeners.SignChangeListener;
- import net.redinginer.core.listeners.TakeCrystalListener;
- import net.redinginer.core.listeners.UkownCommandListener;
- import net.redinginer.core.listeners.action.BlockBreakListener;
- import net.redinginer.core.listeners.action.BlockPlaceListener;
- import net.redinginer.core.listeners.action.PlayerBucketEmptyListener;
- import net.redinginer.core.listeners.action.PlayerBucketFillListener;
- import net.redinginer.core.managers.BanIPManager;
- import net.redinginer.core.managers.BanManager;
- import net.redinginer.core.managers.CombatManager;
- import net.redinginer.core.managers.DeathBanManager;
- import net.redinginer.core.managers.DropFile;
- import net.redinginer.core.managers.DropManager;
- import net.redinginer.core.managers.GuildManager;
- import net.redinginer.core.managers.NameTagManager;
- import net.redinginer.core.managers.TimerManager;
- import net.redinginer.core.managers.UserManager;
- import net.redinginer.core.mysql.store.Store;
- import net.redinginer.core.mysql.store.modes.StoreMode;
- import net.redinginer.core.mysql.store.modes.StoreMySQL;
- import net.redinginer.core.mysql.store.modes.StoreSQLITE;
- import net.redinginer.core.rank.TabThread;
- import net.redinginer.core.tasks.AutoMsgTask;
- import net.redinginer.core.tasks.CheckValidityTask;
- import net.redinginer.core.tasks.CombatTask;
- import net.redinginer.core.tasks.LimitTask;
- import net.redinginer.core.tasks.TabFreshRunnable;
- import net.redinginer.core.utils.CraftingUtil;
- import net.redinginer.core.utils.Logger;
- import net.redinginer.core.utils.Ticking;
- public class CorePlugin extends JavaPlugin implements Listener{
- private static CorePlugin plugin;
- private static Store store;
- private static PluginManager pluginManager;
- public void onLoad() {
- CorePlugin.plugin = this;
- }
- public void onEnable() {
- Bukkit.getPluginManager().registerEvents(this, this);
- // skrrt
- Config.reloadConfig();
- Lang.reloadLang();
- this.initTab();
- for (final Player p : Bukkit.getOnlinePlayers()) {
- final Combat c = CombatManager.getCombat(p);
- if (c == null) {
- CombatManager.createCombat(p);
- }
- }
- new Ticking().start();
- new TabThread();
- this.registerDatabase();
- this.registerManager();
- this.registerListener();
- this.registerTasks();
- registerCommand();
- CraftingUtil.registerRecipe();
- }
- public void onDisable() {
- Bukkit.getScheduler().cancelTasks((Plugin)this);
- for (final Player p : Bukkit.getOnlinePlayers()) {
- CombatManager.removeCombat(p);
- }
- Bukkit.savePlayers();
- for (final World w : Bukkit.getWorlds()) {
- w.save();
- }
- try {
- Thread.sleep(2000L);
- }
- catch (InterruptedException e) {
- e.printStackTrace();
- }
- if (CorePlugin.store != null && CorePlugin.store.isConnected()) {
- CorePlugin.store.disconnect();
- }
- CorePlugin.plugin = null;
- }
- public static CorePlugin getPlugin() {
- return CorePlugin.plugin;
- }
- protected boolean registerDatabase() {
- switch (StoreMode.getByName(Config.DATABASE_MODE)) {
- case MYSQL: {
- CorePlugin.store = new StoreMySQL(Config.DATABASE_MYSQL_HOST, Config.DATABASE_MYSQL_PORT, Config.DATABASE_MYSQL_USER, Config.DATABASE_MYSQL_PASS, Config.DATABASE_MYSQL_NAME, Config.DATABASE_TABLEPREFIX);
- break;
- }
- case SQLITE: {
- CorePlugin.store = new StoreSQLITE(Config.DATABASE_SQLITE_NAME, Config.DATABASE_TABLEPREFIX);
- break;
- }
- default: {
- Logger.warning("Value of databse mode is not valid! Using SQLITE as database!");
- CorePlugin.store = new StoreSQLITE(Config.DATABASE_SQLITE_NAME, Config.DATABASE_TABLEPREFIX);
- break;
- }
- }
- final boolean conn = CorePlugin.store.connect();
- if (conn) {
- CorePlugin.store.update(true, "CREATE TABLE IF NOT EXISTS `{P}users` (" + ((CorePlugin.store.getStoreMode() == StoreMode.MYSQL) ? "`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT," : "`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,") + "`name` varchar(32) NOT NULL,`points` int(11) NOT NULL, `kills` int(11) NOT NULL, `deaths` int(11) NOT NULL, `assists` int(11) NOT NULL, `logouts` int(11) NOT NULL, `coins` int(11) NOT NULL, `group` varchar(32) NOT NULL, " + "`firstIP` varchar(64) NOT NULL, `lastIP` varchar(64) NOT NULL, `firstJoin` bigint(22) NOT NULL, `kit_start` bigint(64) NOT NULL, `kit_yt` bigint(22) NOT NULL, `kit_tw` bigint(22) NOT NULL, " + "`kit_vip` bigint(22) NOT NULL, `kit_svip` bigint(22) NOT NULL, `turboDrop` bigint(22) NOT NULL, `turboExp` bigint(22) NOT NULL,`home` varchar(255) NOT NULL, `lastKill` varchar(32) NOT NULL, `lastKillTime` bigint(22) NOT NULL, `god` int(1) NOT NULL, `lvl` int(11) NOT NULL, `exp` int(11) NOT NULL);");
- CorePlugin.store.update(true, "CREATE TABLE IF NOT EXISTS `{P}guilds` (" + ((CorePlugin.store.getStoreMode() == StoreMode.MYSQL) ? "`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT," : "`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,") + "`tag` varchar(5) NOT NULL, `name` varchar(32) NOT NULL, `owner` varchar(64) NOT NULL, `leader` varchar(64) NOT NULL, `cuboidX` int(11) NOT NULL, `cuboidZ` int(11) NOT NULL, `cuboidSize` int(11) NOT NULL, `life` int(11) NOT NULL, " + "`lifeLastAttack` bigint(22) NOT NULL, `prolong` bigint(22) NOT NULL, `pvp` int(2) NOT NULL, `createTime` bigint(22) NOT NULL, `homeX` double NOT NULL, `homeY` double NOT NULL, `homeZ` double NOT NULL, `ally` varchar(255) NOT NULL, `points` int(11) NOT NULL, `kills` int(11) NOT NULL, `deaths` int(11) NOT NULL, `pvpAlly` int(1) NOT NULL);");
- CorePlugin.store.update(true, "CREATE TABLE IF NOT EXISTS `{P}members` (" + ((CorePlugin.store.getStoreMode() == StoreMode.MYSQL) ? "`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT," : "`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,") + "`name` varchar(32) NOT NULL,`tag` varchar(5) NOT NULL);");
- CorePlugin.store.update(true, "CREATE TABLE IF NOT EXISTS `{P}bans` (" + ((CorePlugin.store.getStoreMode() == StoreMode.MYSQL) ? "`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT," : "`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,") + "`name` varchar(32) NOT NULL,`time` bigint(22) NOT NULL, `reason` text NOT NULL, `admin` varchar(32) NOT NULL, `start` BIGINT(22) NOT NULL);");
- CorePlugin.store.update(true, "CREATE TABLE IF NOT EXISTS `{P}bansip` (" + ((CorePlugin.store.getStoreMode() == StoreMode.MYSQL) ? "`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT," : "`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,") + "`ip` varchar(32) NOT NULL,`time` bigint(22) NOT NULL, `reason` text NOT NULL, `admin` varchar(32) NOT NULL, `start` BIGINT(22) NOT NULL);");
- CorePlugin.store.update(true, "CREATE TABLE IF NOT EXISTS `{P}backups` (" + ((CorePlugin.store.getStoreMode() == StoreMode.MYSQL) ? "`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT," : "`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,") + "`name` varchar(32) NOT NULL,`time` bigint(22) NOT NULL, `killer` varchar(32) NOT NULL, `ping` int(11) NOT NULL, `inventory` text NOT NULL, `armor` text NOT NULL, `enderchest` text NOT NULL);");
- CorePlugin.store.update(true, "CREATE TABLE IF NOT EXISTS `{P}warp` (" + ((CorePlugin.store.getStoreMode() == StoreMode.MYSQL) ? "`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT," : "`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,") + "`name` varchar(32) NOT NULL,`location` text NOT NULL, `group` varchar(32) NOT NULL NOT NULL);");
- CorePlugin.store.update(true, "CREATE TABLE IF NOT EXISTS `{P}deathbans` (" + ((CorePlugin.store.getStoreMode() == StoreMode.MYSQL) ? "`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT," : "`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,") + "`name` varchar(32) NOT NULL,`mode` int(1) NOT NULL, `time` bigint(11) NOT NULL NOT NULL);");
- return conn;
- }
- return conn;
- }
- public static void registerCommand(final Command command) {
- CommandManager.register(command);
- }
- public static void registerListener(final Plugin plugin, final Listener... listeners) {
- if (CorePlugin.pluginManager == null) {
- CorePlugin.pluginManager = Bukkit.getPluginManager();
- }
- for (final Listener listener : listeners) {
- CorePlugin.pluginManager.registerEvents(listener, plugin);
- }
- }
- public static Store getStore() {
- return CorePlugin.store;
- }
- public static void registerCommand() {
- registerCommand(new ListCommand());
- registerCommand(new RankingCommand());
- registerCommand(new GodCommand());
- registerCommand(new BanCommand());
- registerCommand(new UnBanCommand());
- registerCommand(new UnBanIpCommand());
- registerCommand(new ChatCommand());
- registerCommand(new GamemodeCommand());
- registerCommand(new FlyCommand());
- registerCommand(new SpawnCommand());
- registerCommand(new SetSpawnCommand());
- registerCommand(new KitCommand());
- registerCommand(new TpacceptCommand());
- registerCommand(new TpdenyCommmand());
- registerCommand(new TpaCommand());
- registerCommand(new ClearCommand());
- registerCommand(new EnchantCommand());
- registerCommand(new GcCommand());
- registerCommand(new KitsCommand());
- registerCommand(new ItemCommand());
- registerCommand(new EggCommand());
- registerCommand(new GiveCommand());
- registerCommand(new HeadCommand());
- registerCommand(new HealCommand());
- registerCommand(new HelpOpCommand());
- registerCommand(new HomeCommand());
- registerCommand(new KickAllCommand());
- registerCommand(new KickCommand());
- registerCommand(new ListCommand());
- registerCommand(new SetHomeCommand());
- registerCommand(new RepairCommand());
- registerCommand(new TellCommand());
- registerCommand(new ReplyCommand());
- registerCommand(new InvCommand());
- registerCommand(new SlotCommand());
- registerCommand(new SlowmodeCommand());
- registerCommand(new StpCommand());
- registerCommand(new StreamerCommand());
- registerCommand(new VipCommand());
- registerCommand(new YouTubeCommand());
- registerCommand(new CraftCommand());
- registerCommand(new SmietnikCommand());
- registerCommand(new BCGCommand());
- registerCommand(new TpaCommand());
- registerCommand(new WhiteListCommand());
- registerCommand(new PayCommand());
- registerCommand(new WhoIsCommand());
- registerCommand(new StoneCommand());
- registerCommand(new TeleportCommand());
- registerCommand(new BackupCommand());
- registerCommand(new BanIPCommand());
- registerCommand(new RenameCommand());
- registerCommand(new BoyFamerCommand());
- registerCommand(new IsCommand());
- registerCommand(new CobblexCommand());
- registerCommand(new WorkBenchCommand());
- registerCommand(new EnderchestCommand());
- registerCommand(new SpeedCommand());
- registerCommand(new LevelCommand());
- registerCommand(new TurboCommand());
- registerCommand(new StatsCommand());
- registerCommand(new CaseCommand());
- registerCommand(new CobblexCommand());
- registerCommand(new EfektyCommand());
- registerCommand(new HcCommand());
- registerCommand(new DayCommand());
- registerCommand(new NightCommand());
- registerCommand(new NetherCommand());
- registerCommand(new EnableCommand());
- registerCommand(new ConfigCommand());
- registerCommand(new ClearEnderchestCommand());
- registerCommand(new GaCommand());
- registerCommand(new AllyCommand());
- registerCommand(new CreateCommand());
- registerCommand(new DeleteCommand());
- registerCommand(new GetSponsorKitCommand());
- registerCommand(new EnlargeCommand());
- registerCommand(new GuildSetHomeCommand());
- registerCommand(new GuildHomeCommand());
- registerCommand(new InfoCommand());
- registerCommand(new InviteCommand());
- registerCommand(new net.redinginer.core.commands.guild.ItemCommand());
- registerCommand(new JoinCommand());
- registerCommand(new net.redinginer.core.commands.guild.KickCommand());
- registerCommand(new KickCommand());
- registerCommand(new LeaderCommand());
- registerCommand(new OwnerCommand());
- registerCommand(new ProlongCommand());
- registerCommand(new PvpCommand());
- registerCommand(new AutoMsgCommand());
- registerCommand(new LeaveCommand());
- registerCommand(new HelpCommand());
- registerCommand(new GuildHelpCommand());
- registerCommand(new GroupCommand());
- registerCommand(new VanishCommand());
- registerCommand(new ShopCommand());
- registerCommand(new YtlistCommand());
- registerCommand(new DajYTCommand());
- }
- public void registerTasks() {
- new CheckValidityTask().runTaskTimer((Plugin)this, 2400L, 2400L);
- new CombatTask().runTaskTimerAsynchronously((Plugin)this, 40L, 20L);
- new LimitTask().runTaskTimer((Plugin)this, 300L, 300L);
- new AutoMsgTask().runTaskTimerAsynchronously((Plugin)this, 1200L, 1200L);
- new TabFreshRunnable().runTaskTimerAsynchronously((Plugin)this, 600L, 600L);
- }
- public void registerManager() {
- NameTagManager.enable();
- DropFile.saveDefaultConfig();
- DropManager.setup();
- UserManager.loadUsers();
- GuildManager.loadGuilds();
- DeathBanManager.loadDeathsBans();
- BanManager.loadBans();
- BanIPManager.loadBans();
- }
- private void initTab() {
- /*BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new PointsVariable("points"));
- BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new KillsVariable("kills"));
- BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new DeathsVariable("deaths"));
- BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new CoinsVariable("coins"));
- BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new LvlVariable("lvl"));
- BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new GuildVariable("guild"));
- BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new GuildPointsVariable("gpoints"));
- BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new GuildKillsVariable("gkills"));
- BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new GuildDeathsVariable("gdeaths"));
- BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new GuildSizeVariable("gsize"));
- for (int i = 1; i < 16; ++i) {
- BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new TopVariable("top" + i, i));
- }
- for (int i = 1; i < 16; ++i) {
- BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new AssistTopVariable("assiststop" + i, i));
- }
- for (int i = 1; i < 16; ++i) {
- BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new DeathsTopVariable("deathstop" + i, i));
- }
- for (int i = 1; i < 16; ++i) {
- BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new KillsTopVariable("killstop" + i, i));
- }
- for (int i = 1; i < 16; ++i) {
- BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new LvlTopVariable("ltop" + i, i));
- }
- for (int i = 1; i < 16; ++i) {
- BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new TopGuildVariable("gtop" + i, i));
- }
- for (int i = 1; i < 16; ++i) {
- BungeeTabListPlusBukkitAPI.registerVariable((Plugin)this, (Variable)new TopCoinsVariable("coinstop" + i, i));
- }
- */}
- public void registerListener() {
- registerListener((Plugin)this, new InventoryClickListener(), new PlayerJoinListener1(), new PlayerQuitJoinListener(), new PlayerJoinListener(), new TimerManager(), new AsyncPlayerChatListener()
- , new ChatGuildsListener(), new PlayerMoveListener(), new BlockBreakListener(), new BlockPlaceListener(), new PlayerBucketEmptyListener(), new PlayerBucketFillListener()
- , new GuildExplodeListener(), new EntityDamageByEntityListener(), new EntityDamageListener(), new PlayerDeathListener(), new InCommbatInGuildListener(), new TakeCrystalListener()
- , new InventoryClickListener(), new CheckLoginListener(), new BoyListener(), new PlayerInteractListener(), new PunchPotyListener(), new DropBlockBreakListener(), new EntityDeathListener()
- , new InventoryListener(), new OpenInventoryListener(), new SignChangeListener(), new CaseDropListener(), new CasePlaceListener(), new CaseKickQuitListener()
- , new magiccase.listeners.InventoryClickListener(), new CobblexListener(), new UkownCommandListener());
- }
- @EventHandler
- public void onTab(PlayerJoinEvent e) {
- new BukkitRunnable() {
- public void run() {
- TabAPI.setPriority(CorePlugin.getPlugin(), e.getPlayer(), 2);
- TabAPI.setTabString(CorePlugin.getPlugin(),e.getPlayer(), 2, 2, "&4&lELO", 1);
- TabAPI.updatePlayer(e.getPlayer());
- }
- }.runTaskLater(CorePlugin.getPlugin(), 3);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement