Commit Graph

92 Commits

Author SHA1 Message Date
0a9ead5ffb Fix lore being ignored
- The lore, as specified by the translation file, was not applied on ArmoredElytras. This has now been resolved by retrieving the value when creating new AEs.
2021-09-09 13:44:47 +02:00
61e94ee8a1 Update dependencies 2021-09-09 13:31:38 +02:00
bde19bcd6c Add missing netherite permission nodes 2021-06-26 20:56:24 +02:00
7ed7236450 Add missing null check, cache Random 2021-05-20 16:56:40 +02:00
8f1a8baf76 Make AE colors persistent
- Colors of Leather Armored Elytras (as copied from the leather chestplate, if it had a color) is now persistent through AE enchanting/repairing. However, upgrading the AE to a different tier will still remove the data from the AE (as there is no reason to keep it around).
2021-05-18 16:31:11 +02:00
fb449397a3 Store armor color in NBT
- When a new AE is constructed using leather armor, the armor's color is now stored in the chestplate. Note that this is just an initial implementation, as enchanting/repairing will currently remove the color. This will be fixed in a future commit.
2021-05-17 23:00:46 +02:00
bea45dde30 Fix enchantments in smithing table crafting
- Enchantments on the second item in the smithing table were not taken into account for the end result.
2021-04-29 19:50:53 +02:00
73ad900387 Enable more style checks and fix violations 2021-03-28 13:01:08 +02:00
defb6b8b44 Enforce only correct curly braces placement 2021-03-28 11:30:45 +02:00
c8ba1b5471 Add Checkstyle
- Added Checkstyle. Currently only line length is enabled.
2021-03-28 11:03:39 +02:00
95909f2978 Avoid accidentally deleting items
- Fixed not checking return value when trying to give players the result of crafting/upgrading an AE before clearing the items. Thanks, @Tanguygab for the heads-up!
2021-03-28 10:38:34 +02:00
aa1cd41b1e Allow upgrading diamond AE to netherite
- Added config option to make it possible to upgrade diamond AEs to netherite ones.
- Refactored code a bit to avoid duplicating stuff between the crafting/upgrading classes.
2021-03-24 20:08:22 +01:00
a5cf42984b Remove config.yml
- Removed the config.yml file. It hasn't been in use for a long time and its contents were heavily outdated. Closes #1
2021-03-10 15:47:36 +01:00
a4347e52e2 Add option to disable netherite chestplate drop
- Added option to toggle whether netherite armored elytras are dropped as chestplates or not.
2021-03-02 07:59:01 +01:00
b49f24dae4 Allow renaming armored elytras in an anvil 2021-01-08 12:32:22 +01:00
abc8d7475e Add command to list available enchantments 2020-12-16 13:16:30 +01:00
03d0f9492e Switch to NamespacedKeys for enchantments
- Switched to using NamespacedKeys for enchantments instead of their names. This means that all properly registered custom enchantments are supported in one go.
- Removed the overengineered enchantment platform stuff. That was built with the idea that every custom enchantment plugin would have their own way of implementing custom enchantments. However, now that I found out that custom enchantments can just be registered using NamespacedKeys, none of this is required anymore.
2020-12-14 13:17:52 +01:00
9d737eeed5 Create LICENSE 2020-12-11 15:09:05 +01:00
565ecabd2b Remove debug statements 2020-11-25 10:32:55 +01:00
6bdd7e37d4 Spawn netherite AEs as chestplates when dropped
- When a netherite ArmoredElytra is dropped (death, dispenser, whatever), it will now drop as a netherite chestplate instead of as an elytra. This allows it to not burn in lava and stuff (which is handled client side).
2020-11-24 14:21:03 +01:00
94a06dccba Allow repairing wioth multiple items
- Allow repairing AEs using more than 1 repair item at a time. Though it currently doesn't update the anvil GUI properly for whatever reason. However, when you take it out, it will have the correct durability.
2020-11-24 13:32:56 +01:00
ebb6a9ce82 Allow anvil usage when Smithing is enabled
- The anvil can now be used for everything other than creation when smithing table usage is enabled (so repairing, enchanting, ..?).
2020-11-24 12:39:06 +01:00
9cb58d885d Simplify clearing anvil inventory 2020-11-24 12:30:23 +01:00
602acb0088 Allow taking AEs out of smithing table 2020-11-24 12:26:07 +01:00
0e4be02056 Add smithing table AE creation 2020-11-24 12:04:50 +01:00
b8fdec0ed5 Update to Spigot 1.16.4 dependency
- Using 1.16.4 allows making use of PrepareSmithingEvent.
2020-11-24 10:59:00 +01:00
8a7f56e07e Extract anvil events to separate class
- Extracted all anvil-related events from the EventHandlers class into the new AnvilHandlers class. This separation makes it possible to load different types of creation methods later (smithing table).
2020-11-24 10:54:17 +01:00
8e80e86e32 More cleanup 2020-11-23 13:04:23 +01:00
fa15557cb8 General cleanup 2020-11-23 12:10:28 +01:00
07f4e10b62 Implement modular enchantment system
- Added new enchantment management system that makes it easier to add support for custom enchantment plugins.
2020-11-23 11:48:35 +01:00
c77d831c89 Bump version to 3.0 2020-11-23 11:28:20 +01:00
c859d555b2 Drop support for MC <1.15 2020-11-23 09:52:08 +01:00
dd30f02aa2 Drop Minecraft 1.9 support 2020-11-23 09:18:49 +01:00
bd57ea0728 Remove auto updater
- Removed the auto updater because Spiget is too unreliable these days.
2020-11-23 09:14:19 +01:00
2f57f0df59 Fix incorrect armored elytra creation
- No longer making "armored elytra"s out of non-elytra items.
2020-08-04 14:25:53 +02:00
163e6d22a2 Improve 1.16 support
- Netherite Armored Elytras now have 3 armor toughness to match netherite chestplates.
- Fixed missing "netherite" in the list of supported tiers in the translation file.
2020-06-30 15:10:15 +02:00
b29477fe4a Blacklist Spigot-758abbe
- Blacklisted version 758abbe of Spigot. This version contained an NBT-related bug that caused some serious issues. When loading the plugin on this version, the intialization process is aborted and you won't be able to craft or otherwise obtain any new ArmoredElytras.
2020-06-29 13:51:47 +02:00
e3efdfd83b Clean up 2020-06-29 13:04:25 +02:00
9ddc4f9f61 Add support for Netherite, improve tier retrieval
- Added support for creation and general usage of NETHERITE ArmoredElytras.
- Improved ArmorTier retrieval on 1.16+. A PersistentDataContainer is now stored in the item meta to keep track of the armortier of an item. Instead of using the armorvalue of an item to figure out which armortier an item is (which is how it was done before), this container is used instead. This is not only simpler (and probably more reliable), but it also solves the issue where armor values caused collisions between two types (e.g. gold and chain or diamond and netherite).
- Added Netherite tier to translation system.
2020-06-27 15:40:41 +02:00
3fc27ca1fc Add initial 1.16+ support
- Added initial 1.16+ support. This basically means that all the old functions are supposed to work, but none of the new ones are implemented yet (netherite, crafting in smithy). The '+' part refers to the fact that the NBTEditor has a new 1.16+ implementation that uses the Spigot API, which means that it should work just fine in newer versions.
- Using .equals() instead of == for some Integer/Double comparisons.
2020-06-27 12:59:17 +02:00
1053e17b1d Fix updater, compilation, and improve translation
- Fixed the updater thinking a result of UP_TO_DATE meant that the plugin was outdated. This happened because this system is used like this in BigDoors in case the active BD version is a dev-build. However, AE doesn't used dev-builds.
- Fixed resources being placed in the jar twice.
- When the provided text file includes ".txt" in the config, the plugin won't add another ".txt" to the filename (ending up as "filename.txt.txt"). This is a bit more user-friendly.
- Bumped version number to 2.4.13
2020-05-25 17:28:16 +02:00
93bc2a3072 Cleanup
- Removed old updater class that no longer serves a purpose.
- Removed debug statment.
2020-05-23 14:46:40 +02:00
7f09a34fdb Backport Messages from BigDoors v2
- Backported the Messages system from BigDoors v2. This new system does not overwrite the default language file anymore (nor does it make it read-only). Instead, it reads as many translations from whatever file is selected and takes any missing translations from the translation file inside the jar (and lets the admin know that a translation is missing in the console). This makes the plugin a bit friendlier to use for people that cannot be bothered to read the disclaimer at the top of the file.
2020-05-20 13:13:52 +02:00
e093b18124 Update updater
- Updated the updater to use the same system BigDoors uses. This system is much cleaner and better and it uses Spiget to check for updates instead of DBO.
- Introduced new config option "auto-update" to control if new updates are downloaded automatically or not.
2020-05-20 12:19:40 +02:00
51854fa150 Update NBT system to support recent Paper builds
- Overhauled the way armor values are retrieved so that this plugin is compatible with Paper 178+. This new method should also be a bit more robust against future changes.
- Reformatted the code some.
- Fixed FlyDurabilityHandler. It used to check Player#isFlying. This checks if the player if flying using creative flight, not using an elytra. Player#isGliding actually checks if the player is flying using an elytra.
2020-04-19 12:09:48 +02:00
19ab2cdab1 Fix NPE thrown on player death event 2020-03-18 18:31:37 +01:00
c5abedc89b Add 1.15 support, add ArmorEquipEvent
- Added support for version 1.15 of minecraft. From now on, the NBT constructors are private instead of public. During initialization, they're made accessible now.
- Added ArmorEquipEvent that keeps track of every possible way someone might equip armor. It is then cancelled if needed.
- Updated language file. A long and a short name of each tier is now supported, which can be used as variables.
2019-12-11 21:51:51 +01:00
e906ddfdb3 Clean up code, fix bugs, use Maven
- Switched to Maven for project compilation.
- Added config options to globally bypass permissions for crafting and/or wearing of all tiers.
- Now using Consumer for stuff that previously used the ugly is1_9 boolean.
- Switched to using ArmorEquipEvent for checking if players are allowed to wear something. It's much cleaner and includes some previously omitted equip events (such as from a dispenser).
- Code cleanup.
- Fixed issue where unbreakable armored elytras would still "break".
- Added MENDING enchantment to the default set of enchantments again.
- Using Maven shade for bStats and removed the old Metrics class.
2019-08-23 17:37:16 +02:00
080b6c6dab Add config option, improve multi-version support
- Added config option to allow multiple types of protection enchantments
to be applied to a single armored elytra.
- Added XMaterial class that was accidentally omitted in the last
commit.
2019-06-24 13:54:01 +02:00
1e986d60da Cleanup
- Now using correct Maven imports for Spigot etc.
- Removed redundant else (if) statements.
- Added stripped-down version of XMaterial v2.
- Using XMaterial for chest-plate checking because some names were
different in some versions.
2019-06-20 16:59:13 +02:00