Search in sources :

Example 1 with WorldGuardEliteMobOnlySpawnFlag

use of com.magmaguy.elitemobs.thirdparty.worldguard.WorldGuardEliteMobOnlySpawnFlag in project EliteMobs by MagmaGuy.

the class EventsRegistrer method registerEvents.

public static void registerEvents() {
    pluginManager = Bukkit.getPluginManager();
    plugin = MetadataHandler.PLUGIN;
    register(new FirstTimeSetup());
    register(new com.magmaguy.elitemobs.versionnotifier.VersionChecker.VersionCheckerEvents());
    register(new PlayerData.PlayerDataEvents());
    register(new ElitePlayerInventory.ElitePlayerInventoryEvents());
    register(new PlayerStatsTracker());
    register(new PlayerQuestCooldownsLogout());
    register(new ChickenHandler());
    register(new CowHandler());
    register(new MushroomCowHandler());
    register(new PassiveEliteMobDeathHandler());
    register(new PigHandler());
    register(new SheepHandler());
    register(new FindSuperMobs());
    if (ItemSettingsConfig.isPreventEliteItemEnchantment())
        register(new ItemEnchantmentPrevention());
    if (!VersionChecker.serverVersionOlderThan(15, 2))
        if (ItemSettingsConfig.isPreventEliteItemDiamondToNetheriteUpgrade())
            register(new PreventUpgradeDiamondToNetherite());
    // Mob damage
    register(new PlayerDamagedByEliteMobHandler());
    register(new EliteCreeperExplosionHandler());
    register(new EliteMobGenericDamagedHandler());
    register(new EliteMobDamagedByEliteMobHandler());
    if (MobCombatSettingsConfig.isEnableDeathMessages())
        register(new PlayerDeathMessageByEliteMob());
    // explosion regenerator
    if (DefaultConfig.isDoExplosionRegen())
        register(new Explosion.ExplosionEvent());
    // Mob loot
    register(new DefaultDropsHandler());
    register(new ItemLootShower.ItemLootShowerEvents());
    // potion effects
    register(new PlayerPotionEffects());
    // getloot AdventurersGuildMenu
    register(new GetLootMenu.GetLootMenuListener());
    /*
        Register API events
         */
    register(new EliteMobDeathEvent.EliteMobDeathEventFilter());
    register(new EliteMobTargetPlayerEvent.EliteMobTargetPlayerEventFilter());
    register(new EliteMobDamagedEvent.EliteMobDamageEventFilter());
    register(new PlayerDamagedByEliteMobEvent.PlayerDamagedByEliteMobEventFilter());
    register(new EliteMobDamagedByEliteMobEvent.EliteMobDamagedByEliteMobFilter());
    register(new EliteMobEnterCombatEvent.EliteMobEnterCombatEventFilter());
    register(new PlayerPreTeleportEvent.PlayerPreTeleportEventEvents());
    register(new PlayerTeleportEvent.PlayerTeleportEventExecutor());
    register(new SuperMobDamageEvent.SuperMobDamageEventFilter());
    register(new EliteMobDamagedByPlayerEvent.EliteMobDamagedByPlayerEventFilter());
    register(new EliteExplosionEvent.EliteExplosionEvents());
    // Wormholes
    register(new WormholeEntry.WormholeEntryEvent());
    /*
        While these powers could be registered in a more automated way, I realized that it's also a bad way of getting
        silent errors without ever noticing, and ultimately the amount of manual input required is pretty minimal
         */
    // Minor mob powers
    register(new InvulnerabilityArrow());
    register(new InvulnerabilityFallDamage());
    register(new InvulnerabilityKnockback());
    register(new BonusLoot());
    register(new Taunt());
    register(new Corpse());
    register(new Implosion());
    register(new AttackArrow());
    register(new ArrowFireworks());
    register(new AttackBlinding());
    register(new AttackFire());
    register(new AttackFireball());
    register(new TrackingFireball.TrackingFireballEvents());
    register(new AttackFreeze());
    register(new AttackGravity());
    register(new AttackLightning());
    register(new AttackPoison());
    register(new AttackPush());
    register(new AttackWeakness());
    register(new AttackWeb());
    register(new AttackWither());
    register(new AttackVacuum());
    register(new ArrowRain());
    register(new GroundPound());
    register(new LightningBolts());
    register(new FrostCone());
    register(new Thunderstorm());
    register(new Firestorm());
    register(new Bombardment.BombardmentEvents());
    register(new ShieldWall.ShieldWallEvents());
    // Major mob powers
    register(new SkeletonPillar());
    register(new SkeletonTrackingArrow());
    register(new ZombieBloat());
    register(new ZombieFriends());
    register(new ZombieNecronomicon());
    register(new ZombieParents());
    // boss powers
    register(new SpiritWalk());
    register(new GoldShotgun());
    register(new GoldExplosion());
    register(new Flamethrower());
    register(new PlasmaBootsEnchantment.PlasmaBootsEnchantmentEvents());
    if (EnchantmentsConfig.getEnchantment(SoulbindEnchantment.key + ".yml").isEnabled())
        register(new SoulbindEnchantment.SoulbindEnchantmentEvents());
    register(new FlamePyre());
    register(new SummonTheReturned());
    register(new HyperLoot());
    register(new SummonTheReturned());
    register(new SummonEmbers());
    register(new MeteorShower());
    register(new BulletHell());
    register(new DeathSlice());
    register(new FireworksBarrage.FireworksBarrageEvents());
    register(new CustomSummonPower.CustomSummonPowerEvent());
    register(new EnderDragonEmpoweredLightning.EnderDragonEmpoweredLightningEvents());
    register(new CombatEnterScanPower.MajorCombatEnterScanningPowerEvents());
    register(new LightningEnchantment.LightningEnchantmentEvents());
    register(new BonusCoins.BonusCoinsEvents());
    // special powers
    register(new EnderCrystalLightningRod.EnderCrystalLightningRodEvents());
    // Custom bosses
    register(new CustomBossEntity.CustomBossEntityEvents());
    register(new CustomBossDeath());
    register(new SimplePersistentEntity.PersistentEntityEvent());
    register(new CustomBossTaunts());
    register(new PhaseBossEntity.PhaseBossEntityListener());
    register(new RegionalBossEntity.RegionalBossEntityEvents());
    register(new AdvancedAggroManager());
    register(new TransitiveBossBlock());
    register(new TransitiveBlockCommand.TemporaryBossBlockCommandEvents());
    register(new CustomModel.ModelEntityEvents());
    // Metadata (player purger)
    register(new MetadataHandler());
    // Mob merger
    register(new MergeHandler());
    // Natural EliteMobs Spawning
    register(new EntityTracker());
    // Fix lingering entity after crashes
    register(new CrashFix());
    // Natural Mob Metadata Assigner
    register(new NaturalMobSpawnEventHandler());
    // Visual effects
    register(new EffectEventHandlers());
    if (MobCombatSettingsConfig.isObfuscateMobPowers())
        register(new VisualEffectObfuscator());
    // Loot
    if (ItemSettingsConfig.isDoEliteMobsLoot()) {
        register(new LootTables());
        register(new PlaceEventPrevent());
    }
    // Shops
    register(new ProceduralShopMenu());
    register(new CustomShopMenu());
    register(new BuyOrSellMenu());
    register(new SellMenu());
    register(new SetupMenu.SetupMenuListeners());
    register(new ScrapperMenu.ScrapperMenuEvents());
    register(new SmeltMenu.SmeltMenuEvents());
    register(new RepairMenu.RepairMenuEvents());
    register(new RefinerMenu.RefinerMenuEvents());
    register(new EnhancementMenu.EnhancementMenuEvents());
    register(new UnbindMenu.UnbinderMenuEvents());
    // Minecraft behavior canceller
    if (DefaultConfig.isPreventCreeperDamageToPassiveMobs())
        register(new PreventCreeperPassiveEntityDamage());
    if (!VersionChecker.serverVersionOlderThan(15, 0))
        register(new PreventEliteBeeHiveEnter());
    register(new EnderDragonUnstuck());
    if (DefaultConfig.isPreventVanillaReinforcementsForEliteEntities())
        register(new VanillaReinforcementsCanceller());
    register(new LightningSpawnBypass());
    if (ItemSettingsConfig.isEliteDurability())
        register(new AlternativeDurabilityLoss());
    register(new EnderCrystalDamageProtectionBypass());
    // Antiexploits
    register(new PreventMountExploit());
    register(new PreventDarkroomExploit());
    register(new PreventLargeDarkroomExploit());
    register(new PreventTowerExploit());
    register(new PreventEndermanHeightExploit());
    if (AntiExploitConfig.isNoItemPickup())
        register(new PreventItemPickupByMobs());
    if (AntiExploitConfig.isAmbientDamageExploit())
        register(new AmbientDamageExploit());
    if (!VersionChecker.serverVersionOlderThan(14, 0)) {
        register(new HoneyBlockJumpExploit());
    }
    register(new EliteMobDamagedByPlayerAntiExploitListener());
    register(new ActionEvent.ActionEventEvents());
    // Set up health and damage displays
    if (MobCombatSettingsConfig.isDisplayHealthOnHit())
        register(new HealthDisplay());
    if (MobCombatSettingsConfig.isDisplayDamageOnHit())
        register(new PopupDisplay());
    // Initialize items from custom events
    register(new FlamethrowerEnchantment.FlamethrowerEnchantmentEvents());
    register(new SummonMerchantEnchantment.SummonMerchantEvents());
    register(new SummonWolfEnchantment.SummonWolfEnchantmentEvent());
    register(new MeteorShowerEnchantment.MeteorShowerEvents());
    register(new DrillingEnchantment.DrillingEnchantmentEvents());
    register(new IceBreakerEnchantment.IceBreakerEnchantmentEvent());
    register(new GrapplingHookEnchantment.GrapplingHookEnchantmentEvents());
    register(new EarthquakeEnchantment.EarthquakeEnchantmentEvents());
    // register(new UnbindEnchantment.UnbindEvents());
    // Initialize adventurer's guild
    register(new GuildRankMenuHandler());
    // register quests
    register(new KillObjective.KillObjectiveEvents());
    register(new CustomFetchObjective.CustomFetchObjectiveEvents());
    register(new DialogObjective.DialogObjectiveEvents());
    register(new QuestAcceptEvent.QuestAcceptEventHandler());
    register(new QuestCompleteEvent.QuestCompleteEventHandler());
    register(new QuestLeaveEvent.QuestLeaveEventHandler());
    register(new QuestProgressionEvent.QuestProgressionEventHandler());
    register(new QuestTracking.QuestTrackingEvents());
    register(new CustomQuest.CustomQuestEvents());
    register(new QuestInventoryMenu.QuestInventoryMenuEvents());
    // Combat tag
    if (CombatTagConfig.isEnableCombatTag())
        register(new CombatTag());
    // Prevent elitemob on elitemob aggro
    register(new EnderDragonUnstuck.AggroPrevention());
    // Player effect when a rare item is on the ground
    register(new RareDropEffect());
    // NPCs
    register(new NPCDamageEvent());
    register(new NPCInteractions());
    register(new NPCProximitySensor());
    register(new FindNewWorlds());
    register(new WorldGuardSpawnEventBypasser());
    register(new WorldGuardEliteMobOnlySpawnFlag());
    register(new WorldGuardDungeonFlag());
    register(new EntityTransformHandler());
    register(new EliteBlazeWaterDamagePrevention());
    register(new PreventEliteEquipmentDrop());
    register(new CombustionPrevention());
    register(new TreasureChest.TreasureChestEvents());
    // Zone based spawning
    register(new ZoneWarner());
    register(new DaylightWatchdog());
    // On death commands
    register(new OnDeathCommands());
    // Player stuff
    register(new GuildRank.GuildRankEvents());
    // Commands
    register(new RemoveCommand.RemoveCommandEvents());
}
Also used : SkeletonTrackingArrow(com.magmaguy.elitemobs.powers.majorpowers.skeleton.SkeletonTrackingArrow) VisualEffectObfuscator(com.magmaguy.elitemobs.powerstances.VisualEffectObfuscator) ElitePlayerInventory(com.magmaguy.elitemobs.playerdata.ElitePlayerInventory) WorldGuardEliteMobOnlySpawnFlag(com.magmaguy.elitemobs.thirdparty.worldguard.WorldGuardEliteMobOnlySpawnFlag) NaturalMobSpawnEventHandler(com.magmaguy.elitemobs.mobspawning.NaturalMobSpawnEventHandler) PlayerPotionEffects(com.magmaguy.elitemobs.items.potioneffects.PlayerPotionEffects) WormholeEntry(wormhole.WormholeEntry) QuestInventoryMenu(com.magmaguy.elitemobs.quests.menus.QuestInventoryMenu) EliteMobGenericDamagedHandler(com.magmaguy.elitemobs.combatsystem.EliteMobGenericDamagedHandler) InvulnerabilityArrow(com.magmaguy.elitemobs.powers.defensivepowers.InvulnerabilityArrow) DaylightWatchdog(com.magmaguy.elitemobs.gamemodes.nightmaremodeworld.DaylightWatchdog) HealthDisplay(com.magmaguy.elitemobs.combatsystem.displays.HealthDisplay) WorldGuardSpawnEventBypasser(com.magmaguy.elitemobs.thirdparty.worldguard.WorldGuardSpawnEventBypasser) CustomModel(com.magmaguy.elitemobs.thirdparty.modelengine.CustomModel) DialogObjective(com.magmaguy.elitemobs.quests.objectives.DialogObjective) ZombieParents(com.magmaguy.elitemobs.powers.majorpowers.zombie.ZombieParents) EnderDragonEmpoweredLightning(com.magmaguy.elitemobs.powers.majorpowers.enderdragon.EnderDragonEmpoweredLightning) TransitiveBossBlock(com.magmaguy.elitemobs.mobconstructor.custombosses.transitiveblocks.TransitiveBossBlock) SimplePersistentEntity(com.magmaguy.elitemobs.mobconstructor.SimplePersistentEntity) TrackingFireball(com.magmaguy.elitemobs.powers.majorpowers.blaze.TrackingFireball) ZombieFriends(com.magmaguy.elitemobs.powers.majorpowers.zombie.ZombieFriends) SkeletonPillar(com.magmaguy.elitemobs.powers.majorpowers.skeleton.SkeletonPillar) Bombardment(com.magmaguy.elitemobs.powers.meta.Bombardment) CustomFetchObjective(com.magmaguy.elitemobs.quests.objectives.CustomFetchObjective) CombatTag(com.magmaguy.elitemobs.combatsystem.combattag.CombatTag) EntityTracker(com.magmaguy.elitemobs.entitytracker.EntityTracker) OnDeathCommands(com.magmaguy.elitemobs.ondeathcommands.OnDeathCommands) WorldGuardDungeonFlag(com.magmaguy.elitemobs.thirdparty.worldguard.WorldGuardDungeonFlag) PlayerStatsTracker(com.magmaguy.elitemobs.playerdata.PlayerStatsTracker) TreasureChest(com.magmaguy.elitemobs.treasurechest.TreasureChest) EnderCrystalLightningRod(com.magmaguy.elitemobs.powers.specialpowers.EnderCrystalLightningRod) QuestTracking(com.magmaguy.elitemobs.quests.QuestTracking) KillObjective(com.magmaguy.elitemobs.quests.objectives.KillObjective) SetupMenu(com.magmaguy.elitemobs.commands.setup.SetupMenu) ShieldWall(com.magmaguy.elitemobs.powers.defensivepowers.ShieldWall) MergeHandler(com.magmaguy.elitemobs.mobconstructor.MergeHandler) CustomQuest(com.magmaguy.elitemobs.quests.CustomQuest) EffectEventHandlers(com.magmaguy.elitemobs.powerstances.EffectEventHandlers) InvulnerabilityKnockback(com.magmaguy.elitemobs.powers.defensivepowers.InvulnerabilityKnockback) FirstTimeSetup(com.magmaguy.elitemobs.initialsetup.FirstTimeSetup) GuildRankMenuHandler(com.magmaguy.elitemobs.adventurersguild.GuildRankMenuHandler) RemoveCommand(com.magmaguy.elitemobs.commands.admin.RemoveCommand) EliteMobDamagedByEliteMobHandler(com.magmaguy.elitemobs.combatsystem.EliteMobDamagedByEliteMobHandler) ZombieBloat(com.magmaguy.elitemobs.powers.majorpowers.zombie.ZombieBloat) ActionEvent(com.magmaguy.elitemobs.events.ActionEvent) ZoneWarner(com.magmaguy.elitemobs.gamemodes.zoneworld.ZoneWarner) NPCProximitySensor(com.magmaguy.elitemobs.npcs.chatter.NPCProximitySensor) CombatEnterScanPower(com.magmaguy.elitemobs.powers.meta.CombatEnterScanPower) PlayerDamagedByEliteMobHandler(com.magmaguy.elitemobs.combatsystem.PlayerDamagedByEliteMobHandler) NPCInteractions(com.magmaguy.elitemobs.npcs.NPCInteractions) TransitiveBlockCommand(com.magmaguy.elitemobs.mobconstructor.custombosses.transitiveblocks.TransitiveBlockCommand) PlayerQuestCooldownsLogout(com.magmaguy.elitemobs.quests.playercooldowns.PlayerQuestCooldownsLogout) VersionChecker(com.magmaguy.elitemobs.utils.VersionChecker) CustomSummonPower(com.magmaguy.elitemobs.powers.meta.CustomSummonPower) ZombieNecronomicon(com.magmaguy.elitemobs.powers.majorpowers.zombie.ZombieNecronomicon) GuildRank(com.magmaguy.elitemobs.adventurersguild.GuildRank) PopupDisplay(com.magmaguy.elitemobs.combatsystem.displays.PopupDisplay) NPCDamageEvent(com.magmaguy.elitemobs.npcs.NPCDamageEvent) EliteCreeperExplosionHandler(com.magmaguy.elitemobs.combatsystem.EliteCreeperExplosionHandler) PlayerData(com.magmaguy.elitemobs.playerdata.database.PlayerData) InvulnerabilityFallDamage(com.magmaguy.elitemobs.powers.defensivepowers.InvulnerabilityFallDamage)

Aggregations

GuildRank (com.magmaguy.elitemobs.adventurersguild.GuildRank)1 GuildRankMenuHandler (com.magmaguy.elitemobs.adventurersguild.GuildRankMenuHandler)1 EliteCreeperExplosionHandler (com.magmaguy.elitemobs.combatsystem.EliteCreeperExplosionHandler)1 EliteMobDamagedByEliteMobHandler (com.magmaguy.elitemobs.combatsystem.EliteMobDamagedByEliteMobHandler)1 EliteMobGenericDamagedHandler (com.magmaguy.elitemobs.combatsystem.EliteMobGenericDamagedHandler)1 PlayerDamagedByEliteMobHandler (com.magmaguy.elitemobs.combatsystem.PlayerDamagedByEliteMobHandler)1 CombatTag (com.magmaguy.elitemobs.combatsystem.combattag.CombatTag)1 HealthDisplay (com.magmaguy.elitemobs.combatsystem.displays.HealthDisplay)1 PopupDisplay (com.magmaguy.elitemobs.combatsystem.displays.PopupDisplay)1 RemoveCommand (com.magmaguy.elitemobs.commands.admin.RemoveCommand)1 SetupMenu (com.magmaguy.elitemobs.commands.setup.SetupMenu)1 EntityTracker (com.magmaguy.elitemobs.entitytracker.EntityTracker)1 ActionEvent (com.magmaguy.elitemobs.events.ActionEvent)1 DaylightWatchdog (com.magmaguy.elitemobs.gamemodes.nightmaremodeworld.DaylightWatchdog)1 ZoneWarner (com.magmaguy.elitemobs.gamemodes.zoneworld.ZoneWarner)1 FirstTimeSetup (com.magmaguy.elitemobs.initialsetup.FirstTimeSetup)1 PlayerPotionEffects (com.magmaguy.elitemobs.items.potioneffects.PlayerPotionEffects)1 MergeHandler (com.magmaguy.elitemobs.mobconstructor.MergeHandler)1 SimplePersistentEntity (com.magmaguy.elitemobs.mobconstructor.SimplePersistentEntity)1 TransitiveBlockCommand (com.magmaguy.elitemobs.mobconstructor.custombosses.transitiveblocks.TransitiveBlockCommand)1