Commit Graph

40 Commits

Author SHA1 Message Date
Alexander Medvedev
7c3177b404 feat: some more plugin api functions 2026-08-04 20:54:55 +02:00
Alexander Medvedev
42d9391804 feat: add some more events 2026-08-04 14:57:33 +02:00
Mettwasser
98fd79b57e feat(plugin-api): add display impl for uuid (#2497) 2026-07-30 14:24:19 +02:00
Demetrius Kanios
ef325c459e plugin-api: Rework filesystem permissions and move data folders. (#2643) 2026-07-29 09:36:22 +02:00
dorocha
5f127823ae 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).
2026-07-26 11:44:54 +02:00
yunuservices
5d27ab34d3 feat(plugin-api) Add ServerLoadEvent (#2302)
* feat: add ServerLoadEvent

* fix: address ServerLoadEvent review feedback
2026-07-06 20:01:54 +02:00
Niclas
28e8187f23 fix(plugin-api): expose data components to Rust plugins (#2306) 2026-06-28 09:35:52 +02:00
dongzh1
86e41e1ebb feat(plugin): add PlayerRespawnEvent (#2296)
Adds a non-cancellable PlayerRespawnEvent fired from World::respawn_player
once a respawn destination (world, position, rotation) is determined,
exposing it to plugins through the WIT event API (host + guest). The
previous world, respawned world, position, yaw, pitch and whether the
player kept their data are provided. Bumps the pumpkin-plugin-wit
submodule to the matching event definition.

Closes #1714. Depends on Pumpkin-MC/pumpkin-plugin-wit#8.
2026-06-25 13:47:00 +02:00
Alexander Medvedev
96af1fdbf6 chore: expose packet events 2026-06-06 08:52:54 +02:00
Alexander Medvedev
96a9328af8 chore: expose packet events 2026-06-06 07:48:05 +02:00
Illyrius
7481a6e703 chore: re-export EntityType and Dialog related stuff (#2190) 2026-05-26 14:55:26 +02:00
とぴ。(おーけ
f926410e4b feat(wasm-api): add ServerTickEndEvent (#2100)
* feat(plugin-api): add ServerTickEndEvent

Add a non-cancellable event fired at the end of every server tick,
carrying the 0-indexed tick number and the tick duration in nanoseconds.
Wires through all five layers: WIT contract, plugin-api guest binding,
runtime host struct, WASM bridge, and the ticker fire site.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix ci/ fmt

* chore: point pumpkin-plugin-wit submodule to fork with server-tick-end-event

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Revert submodule

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 16:34:09 +02:00
Illyrius
a90996691e fix(wasm-api): re-exported InterAction (#2169) 2026-05-22 16:33:17 +02:00
Alexander Medvedev
2fcc9bcf4a chore: enforce some more clippy lints
pumpkin contributors will love me :cap:
2026-05-20 22:27:54 +02:00
とぴ。(おーけ
898f208ab6 feat(wasm-api): add ServerTickStartEvent (#2099)
* feat(plugin-api): add ServerTickStartEvent

Add a non-cancellable event fired at the start of every server tick,
carrying the 0-indexed tick number. Wires through all five layers:
WIT contract, plugin-api guest binding, runtime host struct, WASM
bridge, and the ticker fire site.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix ci/ fmt

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 09:48:06 +02:00
Alexander Medvedev
aad2e477d9 fix: CI 3 (hopefully) 2026-05-16 12:50:09 +02:00
Alexander Medvedev
966fbec3d3 feat(plugin-api): add java/bedrock abstraction 2026-05-16 09:56:18 +02:00
Alexander Medvedev
5aafff35e8 feat: add bedrock forms 2026-05-15 18:24:28 +02:00
Demetrius Kanios
d5026cb55e feat(plugin-api): Integrate wasmtime_wasi_http (#2128)
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2026-05-14 18:19:37 +02:00
Alvsch
d74b7edf09 fix: packet codegen and export more wit (#2120) 2026-05-10 20:51:09 +02:00
Alexander Medvedev
c61e170b47 fix: ci 2026-04-30 20:02:24 +02:00
Alexander Medvedev
bdc9b79e42 feat: plugin permission system 2026-04-30 19:33:31 +02:00
Alexander Medvedev
cddb7e3f6a feat(plugin-api): allow to set tab header/footer 2026-04-20 14:06:37 +02:00
Demetrius Kanios
776c6dbb1a feat: Rework the versioning logic in the Wasm plugin loader (#2046) 2026-04-19 09:35:38 +02:00
Alexander Medvedev
2b4e3bb332 chore(plugin-api): enable enable_method_chaining 2026-04-17 20:54:36 +02:00
Alexander Medvedev
b31f8a0fdd feat(plugin-api): add entity api 2026-04-15 18:10:51 +02:00
Alexander Medvedev
9012a92287 feat(plugin-api): add support for plugin dependencies 2026-04-15 16:47:08 +02:00
Alexander Medvedev
b6ada28585 feat(plugin-api): added PlayerToggleFlightEvent 2026-04-14 21:45:00 +02:00
Alexander Medvedev
1a8e2649e3 feat(plugin-api): 3 new player events 2026-04-13 21:41:20 +02:00
yunuservices
542a5a2103 feat(wasm-api): expose PlayerInteractUnknownEntityEvent (#1998)
* feat(wasm-api): expose PlayerInteractUnknownEntityEvent

* fix(wasm-api): satisfy clippy for unknown entity event
2026-04-12 16:01:02 +02:00
Alexander Medvedev
7785f8bcd4 plugin(api): add schedulers 2026-04-10 10:36:44 +02:00
Alexander Medvedev
413f7ccb16 feat: more plugin api features 2026-04-07 16:12:46 +02:00
StormLight14
2820c7aaeb chore(plugin-api): expose important interfaces to plugin devs (#1962)
Co-authored-by: stormyyy <stormyyy@kittypetter.org>
2026-04-03 18:39:22 +02:00
HairlessVillager
974bdd98a6 chore: add license to Cargo.toml files (#1927) 2026-03-28 15:47:15 +01:00
yunuservices
0855dbd163 feat(wasm-api): port player egg throw event (#1899) 2026-03-27 12:06:20 +01:00
Illyrius
308cc943c1 feat(api): added missing wit defined events (#1913)
* init

Signed-off-by: illyrius666 <28700752+illyrius666@users.noreply.github.com>

* Clean up comments in events.rs

Removed commented sections for player and server events.

Signed-off-by: Illyrius <28700752+illyrius666@users.noreply.github.com>

* fmt

Signed-off-by: illyrius666 <28700752+illyrius666@users.noreply.github.com>

* seperated the events into their own files and added docs for each

Signed-off-by: illyrius666 <28700752+illyrius666@users.noreply.github.com>

* added/improved missing docs in the other files in the api

Signed-off-by: illyrius666 <28700752+illyrius666@users.noreply.github.com>

* Update pumpkin-plugin-api/Cargo.toml

Signed-off-by: Illyrius <28700752+illyrius666@users.noreply.github.com>

---------

Signed-off-by: illyrius666 <28700752+illyrius666@users.noreply.github.com>
Signed-off-by: Illyrius <28700752+illyrius666@users.noreply.github.com>
2026-03-25 15:25:36 +01:00
yunuservices
581430aeff feat(wasm-api): port player and server core events (#1860)
* feat(wasm-api): port player and server core events

* fix(wasm-api): satisfy clippy for player event batch
2026-03-18 12:32:16 +01:00
Bjorn Beishline
6e84473199 feat: add register permission to wasm (#1841) 2026-03-10 02:31:55 -07:00
Bjorn Beishline
4f5b2e4f39 feat: cleaner API for registering wasm events (#1838) 2026-03-10 02:26:33 -07:00
Bjorn Beishline
576d76dfd6 feat: add wasm plugin api (#1675)
* feat: wasm plugin api base

* fix: make metadata macro work

* chore: fix clippy lints

* Implement guest registering of events

* chore: remove hardcoded v0.1.0  dep in wasm_host

* feat: add events to wasm

* feat: add caching of components

* fix: clippy lints

* chore: update Cargo.lock

* fix: add feature flag for link section

* feat: add base for command wit definitions

* feat: implement arg variants for command wit interface

* feat: add commented out command-tree arg variant

* feat: add wit definitions for text-component and command tree

Introduces the text interface with a builder-pattern resource,
argument-type variant, command-node resource, and register-command
on context. Migrates event and command-sender to use the new
text-component resource.

* feat: add stubs for wasm host

* chore: update wasmtime to v42

* feat: implement three methods of wit textcomponent

* Add consume function

* feat: implement all text-component host methods

Replace todo!() stubs with working implementations for all
HostTextComponent trait methods: style setters, click events,
hover events, add_text, get_text, and encode.

* feat: allow events to be modified

* feat: add some of base for commands

* chore: fix spelling mistake

* chore: remove unused dep

* feat: implement all argument-type to consumer mappings

* Add command exports

* log plugin load errors

* Some commands work

* Some more Commands work

* Update how commands are registered

* Implement locale

* Use handler id with require

* chore: fix some warnings

* Add PlayerLeaveEvent

* chore: fix all clippy warnings

* fix: add more descriptive error message

---------

Co-authored-by: Purdze <r.s.sutton@hotmail.co.uk>
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2026-03-09 18:12:48 +01:00