Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robinbraemer/test-skriptforproto
Call gRPC from Skript
https://github.com/robinbraemer/test-skriptforproto
Last synced: 27 days ago
JSON representation
Call gRPC from Skript
- Host: GitHub
- URL: https://github.com/robinbraemer/test-skriptforproto
- Owner: robinbraemer
- License: mit
- Created: 2021-11-13T16:08:56.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T14:29:03.000Z (11 months ago)
- Last Synced: 2024-05-01T21:02:37.004Z (6 months ago)
- Language: Java
- Size: 69.7 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# test-skriptforproto
This test project showcases how to call a gRPC service from [Skript](https://github.com/SkriptLang/Skript).
## Uses:
- PaperMC as Minecraft server
- Skript plugin for implementing quick solutions on the Minecraft server
- Skript-Reflect addon for Skript to invoke Java code within skripts
- bufbuild tool to generate Protobuf & gRPC client-server code
- gRPC server implemented in the Go programming language
- Gradle to build fat jar from proto generated Java code (copied into server/plugins/skript-reflect)## How to use:
1. Start the Minecraft server in terminal A:
```shell
cd server && ./start.sh
```
2. Start the gRPC server in terminal B:
```shell
cd skriptforproto && go run .
```
3. Open Minecraft and join your server listening on `localhost`.
4. Execute the Minecraft commands and watch the logs. DONE! :D:
- `/hello YourName`
- `/helloAsyncSection YourName` - same as above but non-blocking
- `/helloAsyncFunc Bob 1` - same as above
- `/helloAsyncFunc Robin 0` - zero deadline makes rpc time out immediately