From 5f127823aecabb6bca058deed3c7997fed133531 Mon Sep 17 00:00:00 2001 From: dorocha <141809872+dorochadev@users.noreply.github.com> Date: Sun, 26 Jul 2026 10:44:54 +0100 Subject: [PATCH] feat(plugin-api): expose ItemStack, uuid, event and command arg types (#2526) The item-stack, uuid, and event WIT modules are generated but were never re-exported from the plugin API, so plugin authors could not name ItemStack (needed to build GUI icons, /give, skulls) or construct a uuid. This adds them to the public re-exports, plus EventHandler/FromIntoEvent and the command Arg/ArgumentType/StringType helpers. Revives the change from #2325 (closed unmerged). --- pumpkin-plugin-api/src/lib.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pumpkin-plugin-api/src/lib.rs b/pumpkin-plugin-api/src/lib.rs index 995968beb..a0366fee0 100644 --- a/pumpkin-plugin-api/src/lib.rs +++ b/pumpkin-plugin-api/src/lib.rs @@ -44,7 +44,8 @@ pub mod scheduler; pub mod command { pub use crate::wit::pumpkin::plugin::command::{ - Command, CommandError, CommandNode, CommandSender, ConsumedArgs, + Arg, ArgumentType, Command, CommandError, CommandNode, CommandSender, ConsumedArgs, + StringType, }; } @@ -53,10 +54,16 @@ pub use wit::pumpkin::plugin::{ context::{Context, Server}, data_components, entity, entity_types::EntityType, - gui, i18n, java_dialogs, java_packets, particles, permission, player, scoreboard, server, text, - world, + event::{self as events_wit, EventType}, + gui, i18n, item_stack, java_dialogs, java_packets, particles, permission, player, scoreboard, + server, text, uuid, world, }; +// Convenience re-exports of commonly-used plugin types so plugin authors can +// name them directly (e.g. build an `ItemStack` for a GUI or `/give`). +pub use events::{EventHandler, FromIntoEvent}; +pub use wit::pumpkin::plugin::item_stack::ItemStack; + pub mod java_dialog { pub use crate::wit::pumpkin::plugin::java_dialogs::{ActionButton, DialogBody, DialogType}; }