Repository navigation
Fix AttributeModifier serialization, download exception handling, selector nullability, and relocation package naming - #27
Conversation
|
thanks |
|
Hey. Just wanted to give you a heads up that the account activity for Spagles is incredibly odd, and of the four commits they added to my forked repo, proved to be flat-out wrong or generally avoided practice. I'd probably double check the account's changes again, just in case. |
hi, thanks. yeah i can tell this entire PR was AI-generated (would be nice if they said that) so i triple-checked everything and discussed with some other ppl. the changes here are super minimal and all okay. appreciate the heads up. |
Description
ATTRIBUTE_MODIFIER_GET_AMOUNT_METHODtoRefAttributeModifierand updatedAttributeModifierSerializer#serializeto write the required"amount"field during serialization.AnnoyingDownload#downloadFileto catchIOExceptionduring stream operations, properly invokingfail(dependency, platform)to attempt fallback platforms instead of logging false success and loading corrupt/empty files.raw == nullchecks toSelectorOptional#orElse,orElseSingle, andorElseFlatto prevent passingnullto@NotNull Functionarguments when no input is supplied.AnnoyingPlugin#getRelocationto safely compute package name indices when standard dot-separated package strings (without{}delimiters) are provided.Motivation and Context
AttributeModifierobjects failed withIllegalArgumentException("Missing required field: amount")due to missing serialization output.AnnoyingDownloadwere swallowed silently, causing invalid JARs to be passed to Bukkit's plugin manager.NullPointerExceptionwhen evaluating default functions for absent command arguments.getRelocationresulted in corrupted package target paths (e.g."org.reflections"becoming"rg.reflections").How Has This Been Tested?
./gradlew test) includingAttributeModifierSerializerTest,ConfigMigrationTest, and storage dialect tests using MockBukkit.AttributeModifierand valid handling of dependency download fallbacks.Media:
N/A
Types of changes
Checklist: