Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ItemStack array serialization methods #10387

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add ItemStack array serialization methods #10387

wants to merge 2 commits into from

Conversation

kennytv
Copy link
Member

@kennytv kennytv commented Apr 4, 2024

Serializing multiple items to bytes isn't trivial, so often beginners fall into the trap of using output IO streams and Bukkit serialization instead, so these provide helpful extra methods to deal with item arrays.

Also kept the serialization methods exposed in API as a sort of textbook example/nudge in the right direction of what should be used instead of object streams

Serializing multiple items to bytes isn't trivial, so often beginners fall into the trap of using output IO streams and Bukkit serialization instead, so these provide helpful extra methods to deal with item arrays.
@kennytv kennytv requested a review from a team as a code owner April 4, 2024 15:01
+import java.util.Collection;
import org.bukkit.configuration.serialization.ConfigurationSerializable;
import org.bukkit.configuration.serialization.ConfigurationSerialization;
+import org.bukkit.inventory.ItemStack;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stop kenny

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kashike kashike added the type: feature Request for a new Feature. label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Request for a new Feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants