KyoriPowered / adventure

A user-interface library, formerly known as text, for Minecraft: Java Edition
https://docs.advntr.dev/
MIT License
678 stars 103 forks source link

`CompoundBinaryTag#getBoolean` with default is incorrect #1068

Closed mworzala closed 2 months ago

mworzala commented 2 months ago

It returns the default if the key is present and has a value of false. For example,

var tag = CompoundBinaryTag.builder()
        .putBoolean("test", false)
        .build();
System.out.println(tag.getBoolean("test", true)); // true, but should be false.