Skip to content

Commit

Permalink
Added a new section to the README.md for the ServerTap command and ma…
Browse files Browse the repository at this point in the history
…de it more readable. (#237)
  • Loading branch information
DeathTrooperr authored Jul 24, 2023
1 parent d27af45 commit 07cac9b
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ Head over to https://github.com/phybros/servertap/releases/latest to grab the la

Join the Discord to talk about this plugin https://discord.gg/nSWRYzBMfp

**Note:** If you have a question please post in the support forum on our discord instead of just asking in general chat.
This helps us keep track of issues and questions more effectively and answer your questions quicker.

# Contents

- [Usage](#usage)
- [ServerTap Command](#servertap-command)
- [Current Endpoints](#current-endpoints)
- [TLS](#tls)
- [Authentication](#authentication)
Expand All @@ -31,12 +35,7 @@ Join the Discord to talk about this plugin https://discord.gg/nSWRYzBMfp
# Usage

Install this plugin by dropping the jar into the `plugins/` directory on your
server.

The Permission for the `/servertap` Command is `servertap.admin`.
The Command lets you reload the plugin and display information about it.

Then, you can query the server using `curl` or Postman, or anything that speaks
server. Then, you can query the server using `curl` or Postman, or anything that speaks
HTTP.

For example, query for information about the server itself:
Expand Down Expand Up @@ -89,6 +88,12 @@ $ curl http://localhost:4567/v1/players
}
]
```
# ServerTap Command

ServerTap currently supports only one management command in game. The supported subcommands are `reload` & 'info'
which as their names imply let you reload the plugin and display information basic info about it (version, author, etc).

**Note**: The Permission for the `/servertap` Command is `servertap.admin`.

# Current Endpoints

Expand Down Expand Up @@ -301,7 +306,7 @@ ServerTapWebserverService webserverService = this.getServer().getServicesManager
The Interface provides you with methods to directly add Endpoints to the Webserver:
```java
webserverService.get("/test/ping", ctx -> ctx.status(200).result("Pong!"));
webserverService.get("/test/ws", websocketConfig -> {
webserverService.websocket("/test/ws", websocketConfig -> {
websocketConfig.onMessage(wsMessageContext -> System.out.println(wsMessageContext.message()));
});
```
Expand Down

0 comments on commit 07cac9b

Please sign in to comment.