Giter Club home page Giter Club logo

elitemobs's Introduction

Crowdin

BStats

EliteMobs is a Spigot plugin focused around the creation of bosses. It also adds several other features, such as quests, arenas, items, an extension to in-game progression and dungeons, to name a few.

Feature and configuration documentation: https://github.com/MagmaGuy/EliteMobs/wiki

Discord support channel: https://discord.gg/QSA2wgh

Webapp where you can create content: https://magmaguy.com/webapp/webapp.html

Dev notes:

Repository


Maven repository:

Maven:

<repository>
  <id>elitemobs-repo</id>
  <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</repository>

<dependency>
  <groupId>com.magmaguy</groupId>
  <artifactId>EliteMobs</artifactId>
  <version>9.0.2-SNAPSHOT</version>
  <scope>provided</scope>
</dependency>

Gradle:

repositories {
    //EliteMobs
    maven { url = 'https://s01.oss.sonatype.org/content/repositories/snapshots' }
}

dependencies{
    //EliteMobs
    compileOnly group: 'com.magmaguy', name: 'EliteMobs', version: '9.0.2-SNAPSHOT'
}

Important classes

The following is a list of key classes for the plugin:

EliteItemManager:

com.magmaguy.elitemobs.api.utils.EliteItemManager

This class is specifically made to be the easiest way to interface with Elite Items.

EliteEntity, CustomBossEntity, RegionalBossEntity

These are the key classes for the boss system. RegionalBossEntity extends CustomBossEntity which extends EliteEntity.

EntityTracker

This is used to check if an entity is from EliteMobs and to get the specific instance of that entity.


Note: This documentation is updated as requested. If you feel like it is incomplete and should further expand on some aspects, request it and it will be updated.


API Events

EliteMobs has a few basic APIs to interface with in the com.magmaguy.elitemobs.api package. Here's the breakdown:

ArenaCompleteEvent

Fires when an arena is successfully beaten by players.

CustomEventStartEvent

Fires when a Custom Event starts. Note that in this instance Custom Events refers to the mechanic in which bosses randomly spawn in the Overworld.

  • Can be cancelled

DungeonInstallEvent

Fires when a dungeon is installed by an admin.

  • Can be cancelled

DungeonUninstallEvent

Fires when a dungeon is uninstalled by an admin.

  • Can be cancelled

EliteExplosionEvent

Fires when an Elite Explosion happens. Note that elite explosions have a custom visual effect and regenerate the damage done to terrain after 2 minutes.

  • Can be cancelled

EliteMobDamagedByEliteMobEvent

Used for listening to moments when one Elite damages another Elite. Uses:

  • Same as Bukkit's EntityDamagedByEntity event but for elites specifically
  • Cancelling it might not work. Report if it doesn't.

EliteMobDamagedByPlayerAntiExploitEvent

Used for listening to events which trigger an antiexploit check - doesn't necessarily mean that it detected an exploit. Uses:

  • Same as Bukkit's EntityDamagedByEntity event but for elites specifically
  • Can be cancelled

EliteMobDamagedByPlayerEvent:

Used for listening to moments when a player damages an Elite. Uses:

  • Same as Bukkit's EntityDamagedByEntity event but for players damaging elites specifically
  • Important: can't be cancelled as it only fires after applying the damage

EliteMobDamagedEvent:

Used for listening to moments when an elite is damaged in general. Uses:

  • Same as Bukkit's EntityDamageEvent
  • Important Cancelling this event might not 100% work, report if it doesn't

EliteMobDeathEvent:

Used to listening to moments when an elite is killed. Uses:

  • Same as Bukkit's EntityDeathEvent.

EliteMobEnterCombatEvent:

Used for listening to moments when an elite enters combat against a player. Note that bosses only enter combat after either striking a player or being struck, and not at the moment of targetting. Uses:

  • Get the target (player only) of the Elite
  • Get the elite which entered in combat

EliteMobExitCombatEvent:

Used for listening to moments when an elite leaves combat against a player. Uses:

  • Get the elite which just let combat.

EliteMobHealEvent:

Used when an elite gets healed.

  • Can be cancelled.

EliteMobRemoveEvent:

Used when an elite mob gets removed. Please note that not all removals are permanent as bosses can be removed because the chunks unload while still being persistent.

EliteMobsItemDetector: //todo: remove

Used for detecting whether an ItemStack is an EliteMobs ItemStack (like a custom item or a procedurally generated item). Uses:

  • Detect if an ItemStack is an EliteMobs custom or dynamic item.

EliteMobSpawnEvent:

Used for detecting when an Elite spawns. Uses:

  • Detect when an Elite spawns.
  • Detect which Elite spawned.

EliteMobTargetPlayerEvent:

Used for detecting when an Elite has targetted a player. Uses:

  • Detect when an Elite targets a player.
  • Cancel an Elite's detection of a player.

GenericAntiExploitEvent:

Used for listening to moments when the antiexploit runs a check but no players damaged it. Uses:

  • Detect when the antiexploit is doing a non-player based exploit check.
  • Cancel an antiexploit check.

NPCEntityRemoveEvent:

Used when an npc gets removed. This removal may not be permanent, as it might just be a chunk unload.

NPCEntitySpawnEvent:

Used when an npc gets spawned.

PlayerDamagedByEliteMobEvent:

Used for listening to moments when players are damaged by an Elite. Uses:

  • Same as Bukkit's EntityDamageEvent.

PlayerPreTeleportEvent:

Used when a player starts teleporting through EliteMobs features. There is a 3 second timer before the teleportation actually happens.

  • Can be cancelled.

PlayerTeleportEvent:

Used when a player actually teleports through EliteMobs features.

  • Can be cancelled.

QuestAcceptEvent:

Used when a player accepts a quest.

  • Can be cancelled.

QuestCompleteEvent:

Used when a player completes a quest.

  • Can be cancelled.

QuestLeaveEvent:

Used when a player leaves a quest.

QuestObjectivesCompletedEvent:

Used when all quest objectives for a quest are completed.

QuestProgressionEvent:

Used when a player progresses in a quest, such as by killing a quest mob or collecting a quest item.

QuestRewardEvent:

Used when a player gets the reward from a quest.

SuperMobDamageEvent:

Used when a Super Mob gets damaged.

  • Can be cancelled.

SuperMobDeathEvent:

Used when a Super Mob dies.

SuperMobRemoveEvent:

Used when a Super Mob gets removed. Note that removals might be temporary due to chunk unloads.

SuperMobSpawnEvent:

Used when a Super Mob spawns.

  • Can be cancelled.

To add new item enchantments:

  1. Add new enchantment class to the com.magmaguy.elitemobs.config.enchantments.premade ** extending** EnchantmentsConfigFields to initialize create its config file (naming convention: [EnchantmentName] Config)
  2. Initialize enchantment in CustomEnchantment to initialize the config file
  3. Add enchantment class to com.magmaguy.elitemobs.items.customenchantments extending CustomEnchantment to write the logic for the enchantment (naming convention [EnchantmentName]Enchantment)
  4. Add a public static String called "key" to register using the ItemTagger class for persistent enchantment tracking
  5. Add an entry to the parseEnchantments() method in CustomItem so custom items detect it correctly
  6. (Alternative) Add an entry to generateCustomEnchantments() method in EnchantmentGenerator if the enchantment should appear in procedurally generated items

Note:

  • Don't forget to register events in EventsRegistrer if the part with logic in it requires events.
  • Don't forget to use the damage bypass if the power is supposed to deal custom damage. Damage dealt by the player to an elite can be overwritten in CombatSystem through the static "bypass" boolean field - it makes the next damage dealt to the elite use the raw damage value. For correctly assigning damage, use Bukkit's Damageable#damage(double amount, Entity source) and assign the source to your player.

To add new powers to elites:

to be documented

To add new events:

to be documented

To add new default NPCs:

to be documented

To add new mob types:

to be documented

Special thanks:

Special Thanks to Illusion for spending a few hours proselytizing enums that are also have anonymous method implementations on their constructor.

elitemobs's People

Contributors

frostcone avatar magmaguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

elitemobs's Issues

Terrible lag when using /elitemobs shop

Hi there, I had a terrible problem these days when I try to use /elitemobs shop in my Paper 1.15.2 server.It seems that this command will cause the main server thread to stop respond for more than a minute.I use CitizensCMD to bind the command on a NPC in my server,and when I try to execute it manually,I will meet the same problem.

EliteMobs version: EliteMobs 7.1.0 and 7.1.1 both tested
Server Core: Paper version git-Paper-66 (MC: 1.15.2)
Env:Windows Server 2019 with JRE 8u241

20200225204557

[Feature Request] Return teleport from Adventurers Guild

As the AG is another world I'd suggest saving the world + location when a player uses the /ag then sending them back to that location if the command is executed in the AG. This will stop players from using it as a way to fast travel the map (which most other plugins like warp, home etc will add). Perhaps if the player quits whilst in the AG they should also be returned as well to save having to store the information.

Make project more contributor friendly

Hey!

Cool project and nice that it's open source! However, I can't help but feel the project/repository could benefit from a few changes that would make it easier for other developers to help/contribute to it.

The main points I'd like to see improved are as follows:

  • Add a LICENSE file
  • Add a README.md file containing information the project
  • Add a .gitignore file depicting which files should be kept out of git
  • Add a CONTRIBUTING.md file containing information about compiling/developing the project. (Example: Since the project uses NMS, explain that running BuildTools is required)
  • Implement a build/dependency management system (such as Maven or Gradle)
  • Add documentation to the project as well as information about adding new mobs/powers
  • Remove files that doesn't need to be in git (things like EliteMobs.iml, .idea/, META-INF/ & out/ are all unnecessary I feel)

Let me know what you think and please let me know if you'd like any help reaching any of these goals.

Thanks.

NPE on damage event

Remember, plugins can modify the death message, which includes making it null. If that's what you're acting on. As this happened on the second death of a player fighting a goblin

[20:27:20] [Server thread/ERROR]: Could not pass event EntityDamageByEntityEvent to EliteMobs v6.2.0
org.bukkit.event.EventException: null
	at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:72) ~[patched_1.12.2.jar:git-Paper-1373]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.12.2.jar:git-Paper-1373]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.12.2.jar:git-Paper-1373]
	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:515) [patched_1.12.2.jar:git-Paper-1373]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:500) [patched_1.12.2.jar:git-Paper-1373]
	at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callEvent(CraftEventFactory.java:94) [patched_1.12.2.jar:git-Paper-1373]
	at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:581) [patched_1.12.2.jar:git-Paper-1373]
	at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:484) [patched_1.12.2.jar:git-Paper-1373]
	at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.handleLivingEntityDamageEvent(CraftEventFactory.java:613) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.EntityLiving.damageEntity0(EntityLiving.java:1369) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.EntityHuman.damageEntity0(EntityHuman.java:853) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.EntityLiving.damageEntity(EntityLiving.java:887) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.EntityHuman.damageEntity(EntityHuman.java:766) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.EntityPlayer.damageEntity(EntityPlayer.java:612) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.EntityMonster.B(EntityMonster.java:68) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.EntityZombie.B(EntityZombie.java:202) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.PathfinderGoalMeleeAttack.a(SourceFile:127) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.PathfinderGoalMeleeAttack.e(SourceFile:119) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.PathfinderGoalZombieAttack.e(SourceFile:28) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.PathfinderGoalSelector.a(SourceFile:129) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.EntityInsentient.doTick(EntityInsentient.java:677) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.EntityLiving.n(EntityLiving.java:2123) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.EntityInsentient.n(EntityInsentient.java:508) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.EntityMonster.n(EntityMonster.java:24) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.EntityZombie.n(EntityZombie.java:155) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.EntityLiving.B_(EntityLiving.java:1976) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.EntityInsentient.B_(EntityInsentient.java:247) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.EntityMonster.B_(EntityMonster.java:28) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.World.entityJoinedWorld(World.java:1771) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.World.h(World.java:1741) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.World.tickEntities(World.java:1562) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.WorldServer.tickEntities(WorldServer.java:675) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:914) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:426) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:767) [patched_1.12.2.jar:git-Paper-1373]
	at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:665) [patched_1.12.2.jar:git-Paper-1373]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
Caused by: java.lang.NullPointerException
	at java.lang.String.replace(String.java:2240) ~[?:1.8.0_111]
	at com.magmaguy.elitemobs.collateralminecraftchanges.PlayerDeathMessageByEliteMob.deathMessagePlaceholderConversion(PlayerDeathMessageByEliteMob.java:101) ~[?:?]
	at com.magmaguy.elitemobs.collateralminecraftchanges.PlayerDeathMessageByEliteMob.deathMessageSender(PlayerDeathMessageByEliteMob.java:90) ~[?:?]
	at com.magmaguy.elitemobs.collateralminecraftchanges.PlayerDeathMessageByEliteMob.intializeDeathMessage(PlayerDeathMessageByEliteMob.java:67) ~[?:?]
	at com.magmaguy.elitemobs.mobcustomizer.DamageAdjuster.eliteMobDamageHandler(DamageAdjuster.java:191) ~[?:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor733.execute(Unknown Source) ~[?:?]
	at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70) ~[patched_1.12.2.jar:git-Paper-1373]
	... 36 more

[EliteMobs] Failed to get double value from database!

22:46:43] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:43] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:43] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:43] [Server thread/INFO]: subingc[/182.116.203.13:5246] logged in with entity id 77037 at ([world]-1082.5, 19.0, 854.5)
[22:46:43] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:43] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:43] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:43] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:43] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:43] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:43] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:43] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:43] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:43] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:43] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:43] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:43] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:43] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:43] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:43] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:43] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:43] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:43] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:43] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:43] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:43] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:43] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:43] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:43] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:43] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:43] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:44] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:44] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:44] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:44] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:44] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:44] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:44] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:44] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:44] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:44] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:44] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:44] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:44] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:44] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:44] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:44] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:44] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:44] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:44] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:44] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:44] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:44] [pool-94-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[22:46:44] [pool-94-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[22:46:44] [pool-94-thread-1/WARN]: java.lang.NullPointerException
[22:46:44] [Server thread/INFO]: ๆ‰พไธๅˆฐ่ฟ™ไธช็Žฉๅฎถ

Custom Items Not Working

After taking your advice and moving to the Dev build a version for 1.14 to fix a 1.13.2 issue...

These issues have been resolved months ago in the 1.14 branch, download the dev version if you want a fully functioning version.

Custom Items do not work, the youtube video 'EliteMobs - Making Custom Items' seems to have someone in the comment section having the same issue too but no response has been sent.

That video tells the person watching to use the webtool you made to prevent incorrect formatting; it then mentions to copy/paste the output to ItemCustomLootList.yml (great file names btw); that yml file is non-existant.

I did find a similar one called ItemsUnique.yml; however, the items there have different formats compared to the tool you tell viewers to use.

On the header it contains these fields:

Enable unique items: true
Show item worth: true
Enable Mob Hunting set: true
EliteMob percentual spawn chance increase per hunting set item: 10
Enable Zombie King Axe: true
Enable Depths Seeker Fishing Rod: true
Enable Dwarven Greed pickaxe: true
Enable The Feller: true
Enable Space Bow: true
Enable Test Sword 2: true

These are not added automatically by the webtool, in addition; the items here are formated with '' apostrophes whereas your webtool formats with quotation marks ("").

See the example:

   Test Sword 2:
     Item Type: DIAMOND_SWORD
     Item Name: "Test Sword 2"
     Item Lore:
     - "%aThis Is a test sword to test"
     - "&a The awful design & bugs "
     - "&a This Plugin Has"
     Enchantments:
     - DAMAGE_ALL,20
     Potion Effects:
     - JUMP,2,self,continuous
     Drop Weight: dynamic 

Versus:

  Hunting Bow:
    Item Type: BOW
    Item Name: '&4Elite Mob Hunting Bow'
    Item Lore:
    - Only for natural-born hunters.
    Enchantments:
    - VANISHING_CURSE,1
    - DAMAGE_ARROW,1
    Potion Effects:
    - SATURATION,1,self,continuous
    Drop Weight: dynamic
    Scalability: dynamic

Finally, there is another field that is left blank when using the webtool; that is the 'scalability' field which is set to dynamic or continuous. There is no information on the wiki regarding that field and what it does.

After making sure the syntax and all fields were corrected to include all information other items seem to have; I am still unable to bring the item up in-game.
I have run the commands /em getloot and it is not there; also tried getting the loot by name; /em getloot Test Sword 2.

After investigating more; the command /em getloot [item_name] does not work even with items that do exist;

This plugin seems really cool but if it is not going to work please just say so I can move on with my life and look into other plugins.

Error (Console)

[21:56:53 ERROR]: Could not pass event CreatureSpawnEvent to EliteMobs v7.1.0
java.lang.NullPointerException: null
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:770) ~[patched_1.15.2.jar:git-Paper-118]
at com.sk89q.worldguard.WorldGuard.getPlatform(WorldGuard.java:100) ~[?:?]
at com.magmaguy.elitemobs.worldguard.WorldGuardFlagChecker.checkFlag(WorldGuardFlagChecker.java:15) ~[?:?]
at com.magmaguy.elitemobs.worldguard.WorldGuardEliteMobOnlyFlag.onSpawn(WorldGuardEliteMobOnlyFlag.java:17) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor357.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.15.2.jar:git-Paper-118]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.15.2.jar:git-Paper-118]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.15.2.jar:git-Paper-118]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:559) ~[patched_1.15.2.jar:git-Paper-118]
at org.bukkit.craftbukkit.v1_15_R1.event.CraftEventFactory.callCreatureSpawnEvent(CraftEventFactory.java:626) ~[patched_1.15.2.jar:git-Paper-118]
at org.bukkit.craftbukkit.v1_15_R1.event.CraftEventFactory.doEntityAddEventCalling(CraftEventFactory.java:547) ~[patched_1.15.2.jar:git-Paper-118]
at net.minecraft.server.v1_15_R1.WorldServer.addEntity0(WorldServer.java:1214) ~[patched_1.15.2.jar:git-Paper-118]
at net.minecraft.server.v1_15_R1.WorldServer.addEntity(WorldServer.java:1121) ~[patched_1.15.2.jar:git-Paper-118]
at org.bukkit.craftbukkit.v1_15_R1.CraftWorld.addEntity(CraftWorld.java:1930) ~[patched_1.15.2.jar:git-Paper-118]
at org.bukkit.craftbukkit.v1_15_R1.CraftWorld.spawn(CraftWorld.java:1937) ~[patched_1.15.2.jar:git-Paper-118]
at org.bukkit.craftbukkit.v1_15_R1.CraftWorld.spawn(CraftWorld.java:1521) ~[patched_1.15.2.jar:git-Paper-118]
at org.bukkit.craftbukkit.v1_15_R1.CraftWorld.spawnEntity(CraftWorld.java:747) ~[patched_1.15.2.jar:git-Paper-118]
at com.magmaguy.elitemobs.npcs.NPCEntity.initializeRole(NPCEntity.java:181) ~[?:?]
at com.magmaguy.elitemobs.npcs.NPCEntity.(NPCEntity.java:101) ~[?:?]
at com.magmaguy.elitemobs.npcs.NPCInitializer.(NPCInitializer.java:15) ~[?:?]
at com.magmaguy.elitemobs.EliteMobs.onEnable(EliteMobs.java:132) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.15.2.jar:git-Paper-118]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) ~[patched_1.15.2.jar:git-Paper-118]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:435) ~[patched_1.15.2.jar:git-Paper-118]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugin(CraftServer.java:470) ~[patched_1.15.2.jar:git-Paper-118]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.enablePlugins(CraftServer.java:384) ~[patched_1.15.2.jar:git-Paper-118]
at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:482) ~[patched_1.15.2.jar:git-Paper-118]
at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:298) ~[patched_1.15.2.jar:git-Paper-118]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:885) ~[patched_1.15.2.jar:git-Paper-118]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]

Thanks for help <3 - Gripy

[EliteMobs] Failed to assign custom disguise custom:skin1! Did you configure the disguise correctly?

Here's The Log
https://mclo.gs/7o5L0Vr

Config Of The Custom Boss
isEnabled: true
entityType: SKELETON
name: '&6Exusiai'
level: dynamic
timeout: 60
healthMultiplier: 20.0
damageMultiplier: 16.5
mainHand: 'BOW'
isBaby: false
powers:

  • attack_arrow.yml
  • attack_freeze.yml
  • skeleton_tracking_arrow.yml
    spawnMessage: '&6A Wild Exusiai Has Been Spotted!'
    deathMessages:
  • '&e&l---------------------------------------------'
  • '&6Exusiai has been slain!'
  • '&c&l 1st Damager: $damager1name &cwith $damager1damage damage!'
  • '&6&l 2nd Damager: $damager2name &6with $damager2damage damage!'
  • '&e&l 3rd Damager: $damager3name &ewith $damager3damage damage!'
  • '&aSlayers: $players'
  • '&e&l---------------------------------------------'
    escapeMessage: '&6Exusiai Has Escaped!'
    locationMessage: '&6Exusiai Is $distance Block Away!'
    uniqueLootList:
  • UWU.yml:1
  • Exusiai_Apple_Pie.yml:1
    dropsEliteMobsLoot: true
    dropsVanillaLoot: false
    trails:
  • "HEART"
    onDamageMessages:
  • '&6ํ•˜์•„! ๋‚˜๋Š” ๋‹น์‹ ์„ ์ฃฝ์ผ ๊ฒƒ์ž…๋‹ˆ๋‹ค! (Ha! I Will Kill You!)'
  • '&6์›€์ง์ด์ง€ ๋งˆ! (Stop Moving!)'
  • '&6You Simp! Now I Will Punish You!'
  • '&6๋‚ด ์‚ฌ๊ณผ ํŒŒ์ด๋ฅผ ํ›”์ณค์Šต๋‹ˆ๊นŒ? (Did You Steal My Apple Pie?)'
    onDamagedMessages:
  • '&6์•ผ ๊ทธ๋งŒ ์น˜์ง€! (Ow Stop Hitting Me!)'
  • '&6ํ…์‚ฌ์Šค ๋„์›€๋ง! (Texas Help!)'
  • '&6๋‚ด๊ฐ€ ๋„ˆ๋ฅผ ๋Œ๋ด ์ค„๊ฒŒ (Let Me Take Care Of You)'
  • '&6(๏ธถ๏ธน๏ธบ)'
    announcementPriority: 2
    followDistance: 57
    disguise: custom:skin1
    frozen: false
    isPersistent: true
    spawnChance: 1.5

How to translate?

Let's suppose that I want to translate the plugin for the community. How can I do?

Consistent varaible names for configs

There is a big inconsistency in named variables throughout the files.
the file ItemsCustomLootList.yml has a good consistent layout with properly indented sections.

But files like config.yml have overly insane long variable names, where they should be comments.

For example:
Use titles to warn players they are missing a permission: true
Should be something like:

# Use titles to warn players they are missing a permission
permTitle: true

Using spaces in Variables is nuts. Its just so inconsistent to everything else in the Minecraft spigot world, 99% of plugns follow the same type of structure you have in ItemsCustomLootList, people are used to having configs be neat and clear.

General issues

Great plugin, but has some major issues. Every once in a while the NPCs on Adventures Guild will simply disappear, forcing me to reload the plugin to fix the issue. Even sometimes with the NPCs spawned, I will still have to reload the plugin to fix them. Now on one of the dungeons I have configured a disguise. I will have to reload the plugin again to fix the NPCs. This plugin also tends to bring down the server TPS, I would recommend making it optimized for paperMC. I highly doubt this is a configuration error because I see no errors in console about this whatsoever. I can confirm that there are no incompatible plugins running alongside with this.

Natural Mobs Spawn

Hi, I have disabled it, but elite mobs spawn at the same in each world

[Feature Request] Add Support for Minecraft 1.8.8

Hey there!,

I just want to request if it possible to add support for minecraft 1.8.8. I would really like to use elitemobs on my factions servers, i love this plugin this plugin that i already used before on a server with some friends, it's gives a great hardcore survival experience, but now i wanted to use it on a tacospigot server, thank you so much:D.

Greetings.

File/Structure tidyup

The files are a mess.
You have 2 versions of files:
playerCache, playerGuildrank, playerMaxGuildRank, PlayerMoneyData.
I assume they were moved to a data folder, but were originally in the root folder, then the blanks just kept there?
It makes sense moving them to the data folder, but why on earth is ItemsCustomLootList.yml in the data folder then? this isn't player data, and the other item configs are in the main root? you could have an items folder and put all item data in that folder.

I have each of my plugins stored on github so that I can work with my team to update them, things like playerdata is gitignored, you cant just gitignore the data folder this way.

events.yml needs more options.

Severely lacking options for "Boss" event mobs.

  • There is no message for the Kraken to players option
  • You cannot set what specific items Boss/Event Elites drop, its just tied to one.
  • You cannot change the type of event a boss mob is spawned in, fishing etc, and there are no variables to fine tune each, I have had to disable most of them as players can just farm them and get stacks and stacks of the custom items.
  • There needs to be a universal set of settings for each Boss mob that are the same, consistent settings for each event boss mob

Not Issue Just Question

Are these mini-dungeons randomly generated structures like the OTD (oh the dungeons) plugin does?

Anti-Exploit AI is Garbage

Improved anti-exploit system! The anti-exploit system is now more transparent with when it activates, and some powers have been tweaked or added to lower the chances of players exploiting mob AI.

The "anti-exploit" system considers archery an "exploit" for some reason. After knocking mobs back with my bow, this kicks in and stops them dropping loot. Knockback is not an exploit, it's an enchant ==

I need help

Hi I need this keeps popping up on my console
How can I fix this ? So it doesnโ€™t keep spamming on the console. Thank you

[23:08:41 INFO]: [Example] Invalid command syntax. Correct command syntax is: /elitemobs addRelativeSpawnLocation|addSpawnLocation|adventurersguild|checktier|confirm|customshop|debug|discord|dungeontp|event|getloot|gettier|give|help|killaggressive|killpassive|killtype|menu|money|pay|quest|rank|relativecoords|reload|remove|setrank|setup|shareitem|shop|simloot|spawncustom|spawncustomlevel|spawnelite|spawnlocationcustom|spawnlocationcustomlevel|spawnlocationelite|spawnnpc|spawnsuper|spawntp|stats|trackcustomboss|unbind|updateitem|version|wallet
[23:08:42 INFO]: [Example] Invalid command syntax. Correct command syntax is: /elitemobs addRelativeSpawnLocation|addSpawnLocation|adventurersguild|checktier|confirm|customshop|debug|discord|dungeontp|event|getloot|gettier|give|help|killaggressive|killpassive|killtype|menu|money|pay|quest|rank|relativecoords|reload|remove|setrank|setup|shareitem|shop|simloot|spawncustom|spawncustomlevel|spawnelite|spawnlocationcustom|spawnlocationcustomlevel|spawnlocationelite|spawnnpc|spawnsuper|spawntp|stats|trackcustomboss|unbind|updateitem|version|wallet

How to give item to another player?

Any idea how can I give another player an item I dropped from elite mob? (when I drop it on the flor, they can't pick it up)
/shareitem does not work.
Eventually I can totally turn off soulbounds to items, but I don't know how to do that either.

Ability to (re)set a user tier

User story: As a server operator, I want the ability to set a players tier level so that I can manually, or programmatically via commands, increase or decrease a players EliteMobs tier.

Specific use case: I have Skyblock server that when an /island reset command is entered by a player it not only resets their island it also resets their vault balance, EliteMobs balance, mcMMO scores, Jobs Reborn scores, flight time, end experience. The only thing I cannot do is drop a player EliteMobs tier down to the start. Essentially, my players want to completely start over when resetting their island.

To reset an EliteMobs balance, the command is elitemobs set [player] 0

I'd like something similar such as elitemobs settier [player] 1 where 1 represent the AdenturersGuild.yml value for Fresh Meat

Quest issue

Hi,

I've noticed an issue with the quest "Slain 12 Lvl 20+ Elite Husk". Accepting the question everything seems ok, but when you try to actually achieve the quest it doesn't count it.
I've tried manually spawning a mob down with lvl21 and the same results.

Did pick up another quest from the quest giver "Slain 8 Elite Blaze". I've spawned the Elite blaze into the overworld and it was counted as it should be.

My guess would be that the issue is only affecting the Elite Husks (although I haven't tested the rest of the quest tree)

Server and mod info:
Paper MC ver: 351 - 1.16.4) Elite Mobs: 7.2.16

Let me know if you need any log or information.

Some errors

[EliteMobs] Failed to update database value.
[16:45:04 WARN]: [EliteMobs] Failed to update database value.
[16:45:04 WARN]: org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (cannot commit - no transaction is active)
[16:45:04 WARN]: [EliteMobs] Failed to update database value.
[16:45:04 WARN]: org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (cannot commit - no transaction is active)
[16:45:04 WARN]: org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (cannot commit - no transaction is active)

EliteMobs version 7.2.4(current latest development build)

[EliteMobs] Failed to get double value from database!

[20:45:48] [pool-37-thread-1/WARN]: [EliteMobs] Failed to get double value from database!
[20:45:48] [pool-37-thread-1/WARN]: java.sql.SQLException: ResultSet closed
[20:45:48] [pool-37-thread-1/WARN]: java.lang.NullPointerException
[20:45:48] [pool-37-thread-1/WARN]: at com.magmaguy.elitemobs.playerdata.PlayerData.getCurrency(PlayerData.java:51)
[20:45:48] [pool-37-thread-1/WARN]: at com.magmaguy.elitemobs.economy.EconomyHandler.checkCurrency(EconomyHandler.java:45)
[20:45:48] [pool-37-thread-1/WARN]: at com.magmaguy.elitemobs.thirdparty.placeholderapi.Placeholders.onPlaceholderRequest(Placeholders.java:115)
[20:45:48] [pool-37-thread-1/WARN]: at me.clip.placeholderapi.PlaceholderHook.onRequest(PlaceholderHook.java:31)
[20:45:48] [pool-37-thread-1/WARN]: at me.clip.placeholderapi.replacer.CharsReplacer.apply(CharsReplacer.java:156)
[20:45:48] [pool-37-thread-1/WARN]: at me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(PlaceholderAPI.java:69)
[20:45:48] [pool-37-thread-1/WARN]: at me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(PlaceholderAPI.java:97)
[20:45:48] [pool-37-thread-1/WARN]: at io.puharesource.mc.titlemanager.internal.placeholder.PlaceholderAPIHook.replacePlaceholders(Hooks.kt:18)
[20:45:48] [pool-37-thread-1/WARN]: at io.puharesource.mc.titlemanager.internal.services.placeholder.PlaceholderServiceText.replaceTextFromHooks(PlaceholderServiceText.kt:171)
[20:45:48] [pool-37-thread-1/WARN]: at io.puharesource.mc.titlemanager.internal.services.placeholder.PlaceholderServiceText.replaceText(PlaceholderServiceText.kt:158)
[20:45:48] [pool-37-thread-1/WARN]: at io.puharesource.mc.titlemanager.internal.services.features.ScoreboardServiceSpigot.setScoreboardValue(ScoreboardServiceSpigot.kt:137)
[20:45:48] [pool-37-thread-1/WARN]: at io.puharesource.mc.titlemanager.internal.services.features.ScoreboardServiceSpigot$createScoreboardValueSendableAnimation$4.invoke(ScoreboardServiceSpigot.kt:222)
[20:45:48] [pool-37-thread-1/WARN]: at io.puharesource.mc.titlemanager.internal.services.features.ScoreboardServiceSpigot$createScoreboardValueSendableAnimation$4.invoke(ScoreboardServiceSpigot.kt:33)
[20:45:48] [pool-37-thread-1/WARN]: at io.puharesource.mc.titlemanager.internal.model.animation.PartBasedSendableAnimation.update(PartBasedSendableAnimation.kt:90)
[20:45:48] [pool-37-thread-1/WARN]: at io.puharesource.mc.titlemanager.internal.model.animation.PartBasedSendableAnimation$update$2.invoke(PartBasedSendableAnimation.kt:97)
[20:45:48] [pool-37-thread-1/WARN]: at io.puharesource.mc.titlemanager.internal.model.animation.PartBasedSendableAnimation$update$2.invoke(PartBasedSendableAnimation.kt:10)
[20:45:48] [pool-37-thread-1/WARN]: at io.puharesource.mc.titlemanager.internal.services.task.SchedulerServiceAsync$scheduleRaw$1.run(SchedulerServiceAsync.kt:44)
[20:45:48] [pool-37-thread-1/WARN]: at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[20:45:48] [pool-37-thread-1/WARN]: at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[20:45:48] [pool-37-thread-1/WARN]: at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
[20:45:48] [pool-37-thread-1/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[20:45:48] [pool-37-thread-1/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[20:45:48] [pool-37-thread-1/WARN]: at java.base/java.lang.Thread.run(Thread.java:834)

[API] Add custom loot drop to EliteMobDeathEvent

Hey!

I was about to modify and customize the loot drop, that spawns if an elite mob dies.
Unfortunately the spawned loot drop is not included in EliteMobDeathEvent or EntityDeathEvent#getDrops().

Is there a way to get the loot drops?
If not, would you accept a pull request that includes the loot to EliteMobDeathEvent?

Greetings, Paul

1.8 Compitability?

Please can you make this plugin compitabile with 1.8 version of mc? That can be very big success almost everybody are using 1.8 version.

Could not pass event InventoryClickEvent to EliteMobs v7.1.0

OS: Debian 9 x64
CPU: 1G
Memery: 2G
Server: Paper-1.14.4-b243.jar
Client: Minecraft 1.14.4 Optifine + forge


And, I used the Chinese branch form the repo of "EliteMobs-Translation"

start.sh

#!/bin/bash
java -Xms1280M -Xmx1280M -XX:-UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:+AlwaysPreTouch -XX:+AggressiveOpts -XX:+UseCompressedOops -jar Paper-1.14.4-b243.jar

Plugins:

AConomy.jar
Coins.jar
EssentialsXProtect-2.17.1.0.jar
InvisibleArmor.jar
mcMMO-2.1.116.jar
Residence4.8.8.2.jar
Vault.jar
worldguard-bukkit-7.0.2.jar
AntiCreeper.jar
EliteMobs.jar
EssentialsXSpawn-2.17.1.0.jar
LockettePro-2.9.10.jar
ProtocolLib.jar
SkinsRestorer.jar
VeinMiner-1.14.0.jar
AuthMe-5.6.0-SNAPSHOT.jar
EssentialsX-2.17.1.0.jar
expbank-6.0.0.jar
LuckPerms-Bukkit-5.0.72.jar
QuickShop-3.1.4.15.jar
TreeAssist.jar
worldedit-bukkit-7.0.1.jar

Server code:

[01:25:43] [Server thread/INFO]: huzi issued server command: /em quest
[01:25:45] [Server thread/ERROR]: Could not pass event InventoryClickEvent to EliteMobs v7.1.0
java.lang.ArrayIndexOutOfBoundsException: -1
        at java.util.ArrayList.elementData(ArrayList.java:422) ~[?:1.8.0_232]
        at java.util.ArrayList.get(ArrayList.java:435) ~[?:1.8.0_232]
        at com.magmaguy.elitemobs.quests.QuestsMenu.onTierQuestClick(QuestsMenu.java:101) ~[?:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor301.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:545) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:2314) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.PacketPlayInWindowClick.a(SourceFile:33) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.PacketPlayInWindowClick.a(SourceFile:10) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.TickTask.run(SourceFile:18) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.MinecraftServer.aX(MinecraftServer.java:1029) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:1022) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1006) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:929) ~[Paper-1.14.4-b243.jar:git-Paper-243]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
[01:26:36] [Server thread/INFO]: huzi issued server command: /em quest
[01:26:37] [Server thread/ERROR]: Could not pass event InventoryClickEvent to EliteMobs v7.1.0
java.lang.ArrayIndexOutOfBoundsException: null
[01:26:47] [Server thread/INFO]: huzi issued server command: /em quest

Something went wrong while using /em shop

Hi there, I had a problem when I try to use "/elitemobs shop" in my Paper 1.15.2 server.It should have openned the menu "EliteMobs/menus/procedural_shop_menu.yml" ,however it actually openned "Elitemobs/menus/custom_shop_menus.yml" โ€” the same as "/em cshop" . I tried to reset the configurations , but the problem still remained there.

ScreenRecord.zip

EliteMobs version: EliteMobs 7.1.0
Server_Core: Paper_1.15.2_b227 (MC: 1.15.2)
Env:WinServer 2016 with JRE 8u131

Issues

Hello.
When i using the zombieking's axe it warns this.
[15:36:24] [Server thread/WARN]: java.lang.IllegalArgumentException: Material must be a block! [15:36:24] [Server thread/WARN]: at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.block.CraftBlockState.setType(CraftBlockState.java:126) [15:36:24] [Server thread/WARN]: at net.coreprotect.consumer.Queue.queueContainerBreak(Queue.java:118) [15:36:24] [Server thread/WARN]: at net.coreprotect.database.Database.containerBreakCheck(Database.java:70) [15:36:24] [Server thread/WARN]: at net.coreprotect.listener.EntityListener.onEntityDamageByEntity(EntityListener.java:246) [15:36:24] [Server thread/WARN]: at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37) [15:36:24] [Server thread/WARN]: at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) [15:36:24] [Server thread/WARN]: at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:66) [15:36:24] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:540) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.event.CraftEventFactory.callEvent(CraftEventFactory.java:104) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:834) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:733) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.event.CraftEventFactory.handleNonLivingEntityDamageEvent(CraftEventFactory.java:885) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.event.CraftEventFactory.handleNonLivingEntityDamageEvent(CraftEventFactory.java:871) [15:36:24] [Server thread/WARN]: at net.minecraft.server.v1_13_R2.EntityArmorStand.damageEntity(EntityArmorStand.java:425) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.entity.CraftLivingEntity.damage(CraftLivingEntity.java:274) [15:36:24] [Server thread/WARN]: at com.magmaguy.elitemobs.events.BossSpecialAttackDamage.dealSpecialDamage(BossSpecialAttackDamage.java:23) [15:36:24] [Server thread/WARN]: at com.magmaguy.elitemobs.items.customenchantments.FlamethrowerEnchantment.doDamage(FlamethrowerEnchantment.java:50) [15:36:24] [Server thread/WARN]: at com.magmaguy.elitemobs.items.customenchantments.FlamethrowerEnchantment.access$400(FlamethrowerEnchantment.java:25) [15:36:24] [Server thread/WARN]: at com.magmaguy.elitemobs.items.customenchantments.FlamethrowerEnchantment$FlamethrowerEnchantmentEvents$2.run(FlamethrowerEnchantment.java:133) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:84) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:449) [15:36:24] [Server thread/WARN]: at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1023) [15:36:24] [Server thread/WARN]: at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:440) [15:36:24] [Server thread/WARN]: at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:953) [15:36:24] [Server thread/WARN]: at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:850) [15:36:24] [Server thread/WARN]: at java.lang.Thread.run(Thread.java:748) [15:36:24] [Server thread/WARN]: java.lang.IllegalArgumentException: Material must be a block! [15:36:24] [Server thread/WARN]: at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.block.CraftBlockState.setType(CraftBlockState.java:126) [15:36:24] [Server thread/WARN]: at net.coreprotect.consumer.Queue.queueContainerBreak(Queue.java:118) [15:36:24] [Server thread/WARN]: at net.coreprotect.database.Database.containerBreakCheck(Database.java:70) [15:36:24] [Server thread/WARN]: at net.coreprotect.listener.EntityListener.onEntityDamageByEntity(EntityListener.java:246) [15:36:24] [Server thread/WARN]: at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37) [15:36:24] [Server thread/WARN]: at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) [15:36:24] [Server thread/WARN]: at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:66) [15:36:24] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:540) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.event.CraftEventFactory.callEvent(CraftEventFactory.java:104) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:834) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:733) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.event.CraftEventFactory.handleNonLivingEntityDamageEvent(CraftEventFactory.java:885) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.event.CraftEventFactory.handleNonLivingEntityDamageEvent(CraftEventFactory.java:871) [15:36:24] [Server thread/WARN]: at net.minecraft.server.v1_13_R2.EntityArmorStand.damageEntity(EntityArmorStand.java:425) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.entity.CraftLivingEntity.damage(CraftLivingEntity.java:274) [15:36:24] [Server thread/WARN]: at com.magmaguy.elitemobs.events.BossSpecialAttackDamage.dealSpecialDamage(BossSpecialAttackDamage.java:23) [15:36:24] [Server thread/WARN]: at com.magmaguy.elitemobs.items.customenchantments.FlamethrowerEnchantment.doDamage(FlamethrowerEnchantment.java:50) [15:36:24] [Server thread/WARN]: at com.magmaguy.elitemobs.items.customenchantments.FlamethrowerEnchantment.access$400(FlamethrowerEnchantment.java:25) [15:36:24] [Server thread/WARN]: at com.magmaguy.elitemobs.items.customenchantments.FlamethrowerEnchantment$FlamethrowerEnchantmentEvents$2.run(FlamethrowerEnchantment.java:133) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftTask.run(CraftTask.java:84) [15:36:24] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_13_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:449) [15:36:24] [Server thread/WARN]: at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1023) [15:36:24] [Server thread/WARN]: at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:440) [15:36:24] [Server thread/WARN]: at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:953) [15:36:24] [Server thread/WARN]: at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:850) [15:36:24] [Server thread/WARN]: at java.lang.Thread.run(Thread.java:748)

Error keep spamming on console

Hello,

I'm using the [EliteMobs] version 7.2.39
Whenever a elitemob dies, it's suppose to calculate the pickWeighedProbability, but it returns null

Here is the error:

>.... [14:13:34 ERROR]: Could not pass event EliteMobDeathEvent to EliteMobs v7.2.39 java.lang.NullPointerException: null at com.magmaguy.elitemobs.items.LootTables.generateLoot(LootTables.java:149) ~[?:?] at com.magmaguy.elitemobs.items.LootTables.generateLoot(LootTables.java:117) ~[?:?] at com.magmaguy.elitemobs.items.LootTables.generatePlayerLoot(LootTables.java:74) ~[?:?] at com.magmaguy.elitemobs.powers.bosspowers.HyperLoot.onEliteMobDeath(HyperLoot.java:20) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor904.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.5.jar:git-Purpur-982] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.5.jar:git-Purpur-982] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.5.jar:git-Purpur-982] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.5.jar:git-Purpur-982] at com.magmaguy.elitemobs.utils.EventCaller.<init>(EventCaller.java:8) ~[?:?] at com.magmaguy.elitemobs.api.EliteMobDeathEvent$EliteMobDeathEventFilter.onMobDeath(EliteMobDeathEvent.java:53) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor849.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.5.jar:git-Purpur-982] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.5.jar:git-Purpur-982] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.5.jar:git-Purpur-982] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.5.jar:git-Purpur-982] at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callEntityDeathEvent(CraftEventFactory.java:838) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.EntityLiving.d(EntityLiving.java:1524) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.EntityLiving.die(EntityLiving.java:1444) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.EntityLiving.damageEntity(EntityLiving.java:1273) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.EntityInsentient.damageEntity(EntityInsentient.java:279) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.EntityMonster.damageEntity(EntityMonster.java:52) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.EntityHuman.attack(EntityHuman.java:1108) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.EntityPlayer.attack(EntityPlayer.java:2133) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:2372) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.PacketPlayInUseEntity.a(PacketPlayInUseEntity.java:49) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.PacketPlayInUseEntity.a(PacketPlayInUseEntity.java:6) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:43) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1207) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1200) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1176) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1020) ~[patched_1.16.5.jar:git-Purpur-982] at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:176) ~[patched_1.16.5.jar:git-Purpur-982] at java.lang.Thread.run(Thread.java:834) [?:?]

Invincible EliteMobs

Whenever an EliteMob dies due to a Critical hit from a Bow / Crossbow - They don't disappear.
They remain alive but with zero HP, still with an AI and the ability to attack players.

Spigot jar: 1.16.4
EliteMobs version: 7.2.25
Criticals version: Latest from Jan 5, 2021

Hmu on Discord Therkelsen#1337 if you need more info

HELP ME

I have an error while using EM.
Can you help me?
[18:37:46] [Server thread/INFO]: Little_Fish_Man issued server command: /em quest [18:37:50] [Server thread/ERROR]: Could not pass event InventoryClickEvent to EliteMobs v7.1.0 java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:422) ~[?:1.8.0_222] at java.util.ArrayList.get(ArrayList.java:435) ~[?:1.8.0_222] at com.magmaguy.elitemobs.quests.QuestsMenu.onTierQuestClick(QuestsMenu.java:101) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor387.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[akarin-1.13.2-520.jar:git-Akarin-"9c4d9da"] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[akarin-1.13.2-520.jar:git-Akarin-"9c4d9da"] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:66) ~[akarin-1.13.2-520.jar:git-Akarin-"9c4d9da"] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:540) ~[akarin-1.13.2-520.jar:git-Akarin-"9c4d9da"] at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:2369) ~[akarin-1.13.2-520.jar:git-Akarin-"9c4d9da"] at net.minecraft.server.v1_13_R2.PacketPlayInWindowClick.a(SourceFile:33) ~[akarin-1.13.2-520.jar:git-Akarin-"9c4d9da"] at net.minecraft.server.v1_13_R2.PacketPlayInWindowClick.a(SourceFile:10) ~[akarin-1.13.2-520.jar:git-Akarin-"9c4d9da"] at net.minecraft.server.v1_13_R2.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:15) ~[akarin-1.13.2-520.jar:git-Akarin-"9c4d9da"] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_222] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_222] at net.minecraft.server.v1_13_R2.SystemUtils.a(SystemUtils.java:108) ~[akarin-1.13.2-520.jar:git-Akarin-"9c4d9da"] at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:1031) ~[akarin-1.13.2-520.jar:git-Akarin-"9c4d9da"] at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:440) ~[akarin-1.13.2-520.jar:git-Akarin-"9c4d9da"] at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:953) ~[akarin-1.13.2-520.jar:git-Akarin-"9c4d9da"] at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:850) ~[akarin-1.13.2-520.jar:git-Akarin-"9c4d9da"] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

Get players back from Adventure Guild world

Hey, I'm using EliteMobs on 1.14.4 and when players teleport to the Adventurers Guild world using the /ag command, they cannot get back to their previous location, as there is no command for that, not even Essentials's back command can't do that. Can you please add a command that would teleport them back to their previous location?

Optimization Suggestions

All the links are taken from the experimental branch.

EntityTracker

This one is the most important one as it's frequently used.

public static EliteMobEntity getEliteMobEntity(Entity entity) {

private static final HashSet<EliteMobEntity> eliteMobs = new HashSet<>();
public static EliteMobEntity getEliteMobEntity(Entity entity) {
    if (!EliteMobProperties.isValidEliteMobType(entity)) return null;
    for (EliteMobEntity eliteMobEntity : eliteMobs)
        if (eliteMobEntity.getLivingEntity().equals(entity))
            return eliteMobEntity;
    return null;
}

Here you're looping thro all the mobs in the set to get your entity that you want, this completely defeats the purpose of having a "hash"set/map.
You want it to be O(1) not O(n) (if you don't know what the O stuff means Google Big O notation) not to mention that looping thro a set is much slower than lists and arrays.
Here, you want to switch to a HashMap, which is technically a HashSet, but with different key and value types.

private static final Map<Integer, EliteMobEntity> eliteMobs = new HashMap<>();
public static EliteMobEntity getEliteMobEntity(Entity entity) {
    return eliteMobs(entity.getEntityId());
}

Don't forget to do the same thing for methods accessing npcEntities as well.

That's it. You don't need to check if the entity is valid or anything else. It'll return null anyway.
You don't even need to use the UUID of the entity since you're not doing anything with the UUIDs.
With that being said, you can just remove this. It's redundant.

private static final HashSet<LivingEntity> eliteMobsLivingEntities = new HashSet<>();

Change isEliteMob() to check eliteMobs's map instead and remove the isValidEliteMobType() check.
Note you don't need to use isEliteMob() if you're going to use getEliteMobEntity() after it.

And to register the mobs, you just put them in the HashMap with their LivingEntity#getEntityId() as the key and the instance of EliteMobEntity as the value.


public static void wipeEntity(Entity entity) {

Consider rewriting this method. At least add a boolean check to your unregister methods so you can stop the code from doing extra checks if the last unregister was successful.


public static void memoryWatchdog() {

In this method every time you get an element from the iterator you check for nulls. HashSet can only have one null, but HashMap can have many null values (but only one null key.) You shouldn't check for nulls anyways, because if an element is null, it's simply a programming error, it'd be your fault that you added the null.


SuperMobProperties

public static SuperMobProperties getDataInstance(EntityType entityType) {

Change this method using the same way above.


public static HashSet<EntityType> superMobTypeList = new HashSet<>();

Use an EnumSet instead. I don't think you'll even need this once you fix superMobData map.


EliteMobEntity


This doesn't really have anything to do with performance, but you're using getEquipment() too many times. Just save it to an object and use that object.
I feel like this is useless, but if you want to micro-optimize:

  • It reduces the file size and the generated code.
  • The code basically has to call a method every time.
  • For the sake of your own sanity when writing the code.

But instead of setting the equipments multiple times, make 4 ItemStack objects and once the if checks are over, just use them one time to set the equipment. This will avoid sending packets multiple times.


public boolean hasPower(ElitePower mobPower) {

Instead of a set, use a HashMap with the key as the power's file name or name (preferably the file name since Idk if the name can change or not or they tend to be longer) and the value as an ElitePower.
Then you can just do powers.contains(power.getFileName())
Or override ElitePower hashCode() and equals() to compare the file name string.


WeightedProbability

totalWeight += weighedValues.get(string);

Just loop thro values() instead of keySet()


NonSolidBlockTypes

private static ArrayList<Material> nonSolidBlocks = new ArrayList<>();

Right now this is O(n). Make it a constant (add final modifier) and use an EnumSet instead. It's faster. You don't need initializeNonSolidBlocks() method either, use:

EnumSet.of(one, two, three, four, ...);

If you want it to be more memory efficient and faster, simply use a switch statement.


Frequent

These apply to a lot of classes:

  • Don't use equals() for enums. It doesn't necessarily improve performance. It's mostly used to avoid NPEs and for compilers to catch syntax errors correctly.
  • You might want to consider using Apache's StringUtils.split(String, char) when splitting strings by a single character.
    DONT someString.split(","); DO StringUtils.split(someString, ',');
    Java's default split method uses RegEx and yeah...
  • When comparing worlds don't use equals() for some reasons Spigot's equals() doesn't compare worlds correctly. Simply just do a reference check world == anotherWorld because all the world instances come from a single Map which is in CraftBukkit.
  • If you're doing event.isCancelled() return; right at the beginning of the event, just use ignoreCancelled = true parameter for @EventHandler And yes, it improves performance due to how Bukkit calls events.
  • There is no need to clone getLocation() and getEyeLocation() They're copies.
  • Don't create new Vector objects just to use Location#add(Vector) use Location#add(double x, double y, double z) instead.
  • If you're going to remove an element from a map/set, don't use Map#containsKey or Set#contains do Map#remove(element) != null or Set#remove (which returns a boolean). Same goes for Map#containsKey and Map#get().

PlayerScanner

public static ArrayList<Player> getNearbyPlayers(Location location) {

There is World#getNearbyEntities(Location, double, double, double)
Just pass your range variable to all those double parameters.


TeleportTag

Vector vector = new Vector(player.getLocation().getX(), player.getLocation().getY(), player.getLocation().getZ());

Player#getLocation()#toVector()


if (isTeleportingPlayer((Player) event.getEntity())) cancelPlayerTeleport((Player) event.getEntity());

Don't use containsKey() then remove(), check what remove() returns


NPCProximitySensor

HashSet<Player> seenPlayerList = (HashSet<Player>) nearbyPlayers.clone();

Can't you just remove them directly from the original set if they don't pass the check?



The same thing. Checking if it contains and getting it. Don't do this. This is O(2n) (with the current EntityTracker methods. Normally it'd be O(2))


PlayerData

https://github.com/MagmaGuy/EliteMobs/blob/experimental/src/main/java/com/magmaguy/elitemobs/playerdata/PlayerData.java
I see a lot of containsKey() and get() stuff here. It's important to optimize these since it's the player data.


ElitePower

https://github.com/MagmaGuy/EliteMobs/blob/experimental/src/main/java/com/magmaguy/elitemobs/powers/ElitePower.java
You're creating two new objects here for two different sets. A waste of memory. From what I saw in power classes, there is nothing that can be changed to really make a new object for them.


VersionChecker

public static boolean currentVersionIsUnder(int version, int subVersion) {

I noticed you're using this a lot too. Instead of checking every single time, parse the actualSubVersion integer (which we call the minor version number) as a constant and then you can compare that number with anything you pass to the method.
And you don't need to compare both major and minor numbers. Do you see Minecraft v2 happening any time soon?
To initialize it statically, do this:

private static final int VERSION;
static {
    String version = Bukkit.getVersion();

    // If the index is not found, there's something wrong with the server.
    int index = version.lastIndexOf("MC:");
    version = version.substring(index + 4, version.length() - 1);

    // 1.13.2, 1.14.4, etc...
    int lastDot = version.lastIndexOf('.');
    if (version.indexOf('.') != lastDot) version = version.substring(0, lastDot);

    VERSION = Integer.parseInt(version.substring(2));
}

I really didn't check every single class. Just pointed out the ones I could notice when sliding thro the code.

All chest-gui interfaces don't work as intended.

Hello.
We run EliteMobs on our server, and any time we run /ag or /elitemobs shop, the window opens but the shop itself is just like a chest; players can remove items (namely diamond swords and emeralds) one at a time. This has been abused and we've had to turn it off for now.

Why is this happening and can we fix it?
Note: I have no access to the console for 7 days

Blacksmith's Wont Open Shops

On The EliteMobs_adventurers_guild_world Sometimes, The BlackSmiths Will Not Open Their Shop When Right Clicking. I went to the NPCs.yml and set Disappears at night: to false and it will still do this.

I first I thought it was because of the spawn region I made but even removing it won't solve the problem. I have to restart the server for it to register it again. Also the NPC's used take damage it would be nice if one could modify this so players won't be able to kill them.

Translation

Could you please put out all the configuration files and let people to translate the messages and other things? Thank you.

MineTinker Compatability

Could we potentially get some enchantment compatability with MineTinker so that MineTinker weapons do not become tedious and so armor do not become obsolete when facing Elites, as Elite Protection cannot be applied to MineTinker items, meaning damage from Elites ramps up heavily when wearing something that isn't an EliteMobs armor piece, especially against bosses.

I do have an interesting solution to make it so that MineTinker items do not become obsolete, yet EliteMobs items have their own unique advantage, allowing players to choose between one type of item or another:
Elites can rarely drop a custom Modifier that will apply an EliteMobs enchantment to a MineTinker item; players will also be able to craft these modifiers, however, the modifiers crafted by players will only be able to be applied to a MineTinker item if it has a modifier slot available, whereas modifiers dropped by Elites can be applied regardless and will not take up a modifier slot.

Some examples of EliteMobs enchantments as MineTinker modifiers are:

Elite's Bane Modifier (Haunted Gold): A catch-all modifier for Elite Sharpness, Elite Power, and Elite Protection that uses a Gold Ingot as a base model. The modifier is crafted either through enchantment of a Gold Ingot (right-clicking the desired item on a bookshelf, which will consume 10 levels of experience in the process), or through crafting together an ender eye, four gold ingots, a rottem flesh, a bone, a spider eye, and a gunpowder. The modifier likely won't have a cap or at least a very high one to reflect the EliteMobs enchantment, and is the most likely modifier to drop off an Elite.

Hunting Modifier (Hunting Eye): This modifier uses an Ender Eye as a base model and applies the Hunter enchant. The modifier can be crafted by surrounding a compas with 4 ender eyes and 4 ender pearls or phantom membranes (your choice). This modifier will have a capacity of 3, just like the enchantment, and is a more uncommon modifier to drop.

Critical Modifier (Heavy Flint): This modifier uses a flint as a base model and applies the Critical Strikes enchantment. The modifier can be crafted by placing 4 obsidian and 4 iron around a flint, and will likely have a capacity of 10 or possibly less, and is as likely to drop as the Hunting modifier.

I hope this gets read and acknowledged, so that we could potentially get more addons to mesh and be compatable with EliteMobs, as it is a really good addon.

Aternos?

How can I download the Adventurer's Guild on Aternos? Is it possible? I like that map and also I can't get any quests, I guess I need to go to the Adventurer's Guild...

Errors with npcs

In the stable version the published after a good time the npcs disappear, however when you upgrade to the beta version the npc back_teleporter.yml returns this error message:

java.lang.IllegalArgumentException: Cannot translate null text
        at org.apache.commons.lang.Validate.notNull(Validate.java:192) ~[patched_1.16.5.jar:git-Paper-466]
        at org.bukkit.ChatColor.translateAlternateColorCodes(ChatColor.java:354) ~[patched_1.16.5.jar:git-Paper-466]
        at com.magmaguy.elitemobs.ChatColorConverter.convert(ChatColorConverter.java:14) ~[?:?]
        at com.magmaguy.elitemobs.npcs.NPCInteractions.playerNPCInteract(NPCInteractions.java:111) ~[?:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor716.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.5.jar:git-Paper-466]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.5.jar:git-Paper-466]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.5.jar:git-Paper-466]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.5.jar:git-Paper-466]
        at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:2196) ~[patched_1.16.5.jar:git-Paper-466]
        at net.minecraft.server.v1_16_R3.PacketPlayInUseEntity.a(PacketPlayInUseEntity.java:49) ~[patched_1.16.5.jar:git-Paper-466]
        at net.minecraft.server.v1_16_R3.PacketPlayInUseEntity.a(PacketPlayInUseEntity.java:6) ~[patched_1.16.5.jar:git-Paper-466]
        at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:23) ~[patched_1.16.5.jar:git-Paper-466]
        at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Paper-466]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Paper-466]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Paper-466]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Paper-466]
        at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1133) ~[patched_1.16.5.jar:git-Paper-466]
        at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1126) ~[patched_1.16.5.jar:git-Paper-466]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Paper-466]
        at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1087) ~[patched_1.16.5.jar:git-Paper-466]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1001) ~[patched_1.16.5.jar:git-Paper-466]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:174) ~[patched_1.16.5.jar:git-Paper-466]
        at java.lang.Thread.run(Thread.java:834) [?:?]

Also when restarting the npcs disappear or when doing /em reload and do not come out in their defined positions and the npc travelling_merchant.yml does not appear to you their role.

[16:17:31 INFO]: This server is running Paper version git-Paper-466 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
[16:17:31 INFO]: Checking version, please wait...
[16:17:31 INFO]: Previous version: git-Paper-437 (MC: 1.16.5)
[16:17:31 INFO]: You are running the latest version
[EliteMobs] version 7.2.34

gitignore file

As you do not accept any pull requests, could you provide a .gitignore file that contains at least:

# Eclipse
.metadata/
.recommenders/
.checkstyle
.classpath
.project
.settings
bin/
target/

# IntelliJ IDEA
.idea/
*.iml

I would appreciate it.
Greetings, Paul

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.