Added 1.19.4 and 1.20/1.20.1 support, changed the config file a lot, please regenerate it.
Added a new option "correct-item" to attack and mine and set to true by default, this makes it so only item's that should be able to break a block, can break that block, and only item's that have damage, should be able to damage instead of all items being able to do everything.
Added 1.18 support, rewrote all the attack code to be more efficient, smaller, not as buggy and easier to maintain. This resulted in a few issues that were hard to fix being fixed, the biggest was off-hand weapons using the main-hand swing cooldown, this has been corrected and off-hand weapons should always use the correct damage and cooldown. Added a blacklist for items when attacking or mining, BOW, CROSSBOW and SHIELD are on blacklisted by default. Added options to cancel the event which caused the attack and mine to take place, this does not cancel attacking or mining, only the original event, this means that off-hand axes won't strip logs and off-hand shovels won't turn grass into paths.
Fixed a bug that allowed you to break unbreakable blocks like nether and end portals.
Fixed an error happening between version 1.13.* and 1.16.*, this was caused because I added api-version to the plugin.yml and didn't update some parts to use block data instead of material data.
Added 1.17.1 support, a config file, a reload command and fixed a few bugs.
Fixed an issue in 1.16.5.
Fixed player status effects not effecting attack damage or mining speed. This includes strength, haste and mining fatigue. I also limited mining to tools and weapons like I did with attacking, so you don't accidentally break blocks with off-hand items.
This update fixes the Unbreakable tag not being detected on 1.16.2, also now off-hand attacking is restricted to weapons and tools rather than all items. You don't have to worry about attacking your pets when trying to heal or feed them anymore!
Added a check for the NBT key "Unbreakable", which should improve compatibility with plugins like MythicMobs.
Added 1.16.2 support, 1.16.1 support might be phased out eventually to save on file size. I might even split the plugin into multiple jars for each version since the size of the plugin comes from the repeating NMS code classes.
This update also fixes items taking damage for players in creative mode.
Changed event priority to monitor and added check for isCanceled in both events, this improves compatibility with other plugins that add extra functions for blocks and tools and cancel the event.
Fixed a bug relating to certain blocks being instant hit with any tool.
This update fixes netherite tools not being detected as valid dual wielding items.
I also updated the API, since the off-hand item gets put in the main-hand slot during the duration of the event for plugin compatibility it now swaps them around so you can get both. it's recommended to use the getItemInMainHand and getItemInOffHand in the API rather than getting it from the players inventory as it swaps them correctly and removes the items meta data used to detect if an event was triggered using an off-hand action.
I fixed a bug were players could attack in spectator mode.
Third party plugins should be more compatible with off-hand attacks now, this includes custom enchantment type plugins.
I added dualwield.mine and dualwield.attack permissions which are given by default.
Added an API which allows you to check if BlockBreakEvent and EntityDamageByEntityEvent were done using off-hand actions.
Removed the ability to mine using right click when nothing is in your off-hand. This confused many people and I needed to remove it to implement the API.
This release mainly adds support for older Minecraft versions. All builds from 1.9.4 upwards should work.
This version also makes the mining block task run async, this should improve performance if there even was any sort of performance loss.
I also fixed it so players mine slower if they are under water or in a vehicle.
This release mainly adds support for older Minecraft versions. All builds from 1.9.4 upwards should work.
This version also makes the mining block task run async, this should improve performance if there even was any sort of performance loss.
I also fixed it so players mine slower if they are under water or in a vehicle.
This update fixes players not being able to damage entities when right clicking with nothing in their offhand. This also fixes the console error because of it.