add metadata cleanup for trick shot

This commit is contained in:
nossr50 2024-03-30 05:35:02 -07:00
parent e9407246d7
commit 84cb6e3f7b
2 changed files with 4 additions and 3 deletions

View File

@ -1,9 +1,6 @@
Version 2.2.000 Version 2.2.000
TODO: Add check to archery arrow retrieval to not work for crossbows 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: 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: 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 Xbows/Tridents to salvage/repair
TODO: Add unit test for combat XP values TODO: Add unit test for combat XP values

View File

@ -48,6 +48,10 @@ public class ProjectileUtils {
if(arrow.hasMetadata(MetadataConstants.METADATA_KEY_MULTI_SHOT_ARROW)) { if(arrow.hasMetadata(MetadataConstants.METADATA_KEY_MULTI_SHOT_ARROW)) {
arrow.removeMetadata(MetadataConstants.METADATA_KEY_MULTI_SHOT_ARROW, mcMMO.p); 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) { public static void copyArrowMetadata(@NotNull Plugin pluginRef, @NotNull Arrow arrowToCopy, @NotNull Arrow newArrow) {