https://github.com/fameless9/chatresponseapi
API to get chat responses from players easily and asynchronously
https://github.com/fameless9/chatresponseapi
bukkit java jitpack library minecraft papermc plugin-development spigot spigot-api
Last synced: 5 months ago
JSON representation
API to get chat responses from players easily and asynchronously
- Host: GitHub
- URL: https://github.com/fameless9/chatresponseapi
- Owner: Fameless9
- License: gpl-3.0
- Created: 2025-04-13T21:07:26.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-04-23T09:58:57.000Z (6 months ago)
- Last Synced: 2025-04-23T10:48:22.367Z (6 months ago)
- Topics: bukkit, java, jitpack, library, minecraft, papermc, plugin-development, spigot, spigot-api
- Language: Java
- Homepage:
- Size: 69.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ChatResponseAPI
A simple and lightweight API to await player chat responses asynchronously in Spigot plugins.
[](https://jitpack.io/#Fameless9/ChatResponseAPI)
---
## ✨ Features
- Await player chat input asynchronously
- Works with timeouts
- Perfect for menus, prompts, or simple chat-based forms---
## 📦 Installation
### Add JitPack to your repositories
build.gradle.kts
(Kotlin DSL)```kotlin
repositories {
maven("https://jitpack.io")
}
```
build.gradle
(Groovy DSL)```groovy
repositories {
maven { url 'https://jitpack.io' }
}
```
pom.xml
(Maven)```xml
jitpack.io
https://jitpack.io
```---
### Add the dependency
build.gradle.kts
```kotlin
dependencies {
compileOnly("com.github.Fameless9:ChatResponseAPI:1.0.0")
}
```
build.gradle
```groovy
dependencies {
compileOnly 'com.github.Fameless9:ChatResponseAPI:1.0.0'
}
```
pom.xml
```xml
com.github.Fameless9
ChatResponseAPI
1.0.0
provided
```---
### Register the API listener
Register the ChatResponseListener in your onEnable method:
```java
getServer().getPluginManager().registerEvents(ChatResponseListener.INSTANCE, this);
```---
## 🛠️ Usage Example
```java
player.sendMessage("What does rule 4 say?");
ChatResponseAPI.awaitResponse(player, 10_000).thenAccept(response -> {
player.sendMessage("You answered: " + response);
});
```
---## 📄 License
This project is licensed under the MIT License – see [LICENSE](LICENSE) for details.