From 84cb6e3f7b82ca7e9de7292aaace25a1575831dc Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sat, 30 Mar 2024 05:35:02 -0700 Subject: [PATCH] add metadata cleanup for trick shot --- Changelog.txt | 3 --- .../java/com/gmail/nossr50/util/skills/ProjectileUtils.java | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 928cad658..6f3911d24 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,9 +1,6 @@ Version 2.2.000 TODO: Add check to archery arrow retrieval to not work for crossbows - TODO: More SQL unit tests - TODO: Test mysql/mariadb changes TODO: Add metadata cleanup unit tests - TODO: Cleanup new arrow metadatas TODO: com/gmail/nossr50/database/FlatFileDatabaseManager.java:109 reporting data entries that need correction on each launch TODO: Add Xbows/Tridents to salvage/repair TODO: Add unit test for combat XP values diff --git a/src/main/java/com/gmail/nossr50/util/skills/ProjectileUtils.java b/src/main/java/com/gmail/nossr50/util/skills/ProjectileUtils.java index 6427117ae..f64bac7a3 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/ProjectileUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/ProjectileUtils.java @@ -48,6 +48,10 @@ public class ProjectileUtils { if(arrow.hasMetadata(MetadataConstants.METADATA_KEY_MULTI_SHOT_ARROW)) { arrow.removeMetadata(MetadataConstants.METADATA_KEY_MULTI_SHOT_ARROW, mcMMO.p); } + + if(arrow.hasMetadata(MetadataConstants.METADATA_KEY_BOUNCE_COUNT)) { + arrow.removeMetadata(MetadataConstants.METADATA_KEY_BOUNCE_COUNT, mcMMO.p); + } } public static void copyArrowMetadata(@NotNull Plugin pluginRef, @NotNull Arrow arrowToCopy, @NotNull Arrow newArrow) {