Commit Graph

152 Commits

Author SHA1 Message Date
Pim van der Loos
bd9380b538
Get rid of INBTEditor interface
- The INBTEditor interface has been removed, as there's only a single implementation of it with absolutely no need to create any others in the future.
2021-11-03 13:58:37 +01:00
Pim van der Loos
527d4c079c
Bump minimum requirements to Java 16 and MC 1.17 2021-11-02 17:34:58 +01:00
Pim van der Loos
831e5464c5
Move DurabilityManager class 2021-11-02 16:40:00 +01:00
Pim van der Loos
3b93735c68
Merge pull request #3 from PimvanderLoos/durability
Durability
2021-11-02 15:20:13 +01:00
Pim van der Loos
d4d8e307c5
Use new durability in other classes 2021-11-02 15:04:18 +01:00
Pim van der Loos
3b1dda55d7
Use custom durability
- The durability of armored elytras is now stored in their NBT. This allows us to use custom max durability values for different armor tiers. Currently, only the anvil code uses the new durability system. The rest of the plugin will follow in a future commit, as all parts that interact with durability in any way will need to be updated. The durability returned by the regular methods now only show the display durability.
2021-11-01 18:16:36 +01:00
Pim van der Loos
97b84ad211
Dynamically generate repair options for config 2021-11-01 15:59:50 +01:00
Pim van der Loos
53b5dfbc5f
Cleanup pom a bit 2021-11-01 13:48:07 +01:00
Pim van der Loos
7e78ee74e9
Add allowAddingEnchantments config option
- Added the "allowAddingEnchantments" config option to control whether enchantments can be added to existing armored elytras.
2021-10-29 12:38:54 +02:00
Pim van der Loos
62f316314f
Rename enchantment list command and add aliases
- The old name of the command to list all registered commands on the server was "listAvailable". This name provides no information about what it actually lists, making it hard to remember or use. The command now has 3 names: "listAvailableEnchantments", "listEnchantments", and "enchantments". These commands should be easier to remember and use.
2021-09-09 13:53:35 +02:00
Pim van der Loos
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
Pim van der Loos
61e94ee8a1
Update dependencies 2021-09-09 13:31:38 +02:00
Pim van der Loos
bde19bcd6c
Add missing netherite permission nodes 2021-06-26 20:56:24 +02:00
Pim van der Loos
7ed7236450
Add missing null check, cache Random 2021-05-20 16:56:40 +02:00
Pim van der Loos
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
Pim van der Loos
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
Pim van der Loos
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
Pim van der Loos
73ad900387
Enable more style checks and fix violations 2021-03-28 13:01:08 +02:00
Pim van der Loos
defb6b8b44
Enforce only correct curly braces placement 2021-03-28 11:30:45 +02:00
Pim van der Loos
c8ba1b5471
Add Checkstyle
- Added Checkstyle. Currently only line length is enabled.
2021-03-28 11:03:39 +02:00
Pim van der Loos
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
Pim van der Loos
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
Pim van der Loos
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
Pim van der Loos
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
Pim van der Loos
b49f24dae4
Allow renaming armored elytras in an anvil 2021-01-08 12:32:22 +01:00
Pim van der Loos
abc8d7475e
Add command to list available enchantments 2020-12-16 13:16:30 +01:00
Pim van der Loos
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
PimvanderLoos
9d737eeed5
Create LICENSE 2020-12-11 15:09:05 +01:00
Pim van der Loos
565ecabd2b
Remove debug statements 2020-11-25 10:32:55 +01:00
Pim van der Loos
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
Pim van der Loos
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
Pim van der Loos
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
Pim van der Loos
9cb58d885d
Simplify clearing anvil inventory 2020-11-24 12:30:23 +01:00
Pim van der Loos
602acb0088
Allow taking AEs out of smithing table 2020-11-24 12:26:07 +01:00
Pim van der Loos
0e4be02056
Add smithing table AE creation 2020-11-24 12:04:50 +01:00
Pim van der Loos
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
Pim van der Loos
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
Pim van der Loos
8e80e86e32
More cleanup 2020-11-23 13:04:23 +01:00
Pim van der Loos
fa15557cb8
General cleanup 2020-11-23 12:10:28 +01:00
Pim van der Loos
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
Pim van der Loos
c77d831c89
Bump version to 3.0 2020-11-23 11:28:20 +01:00
Pim van der Loos
c859d555b2
Drop support for MC <1.15 2020-11-23 09:52:08 +01:00
Pim van der Loos
dd30f02aa2
Drop Minecraft 1.9 support 2020-11-23 09:18:49 +01:00
Pim van der Loos
bd57ea0728
Remove auto updater
- Removed the auto updater because Spiget is too unreliable these days.
2020-11-23 09:14:19 +01:00
Pim van der Loos
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
Pim van der Loos
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
Pim van der Loos
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
Pim van der Loos
e3efdfd83b
Clean up 2020-06-29 13:04:25 +02:00
Pim van der Loos
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
Pim van der Loos
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