Update README's

This commit is contained in:
broccolai 2020-10-05 23:36:57 +00:00 committed by Josh Taylor
parent 8217290975
commit 8f8f98b189
2 changed files with 81 additions and 9 deletions

View file

@ -68,6 +68,7 @@ The code is based on a (W.I.P) paper that can be found [here](https://github.com
- **cloud-minecraft/cloud-bungee**: BungeeCord 1.8.8+ implementation of Cloud - **cloud-minecraft/cloud-bungee**: BungeeCord 1.8.8+ implementation of Cloud
- **cloud-minecraft/cloud-velocity**: Velocity v1.1.0 implementation of cloud - **cloud-minecraft/cloud-velocity**: Velocity v1.1.0 implementation of cloud
- **cloud-minecraft/cloud-cloudburst**: Cloudburst v1.0.0+ implementation of cloud - **cloud-minecraft/cloud-cloudburst**: Cloudburst v1.0.0+ implementation of cloud
- **cloud-minecraft/cloud-minecraft-extras**: Opinionated Extra Features for cloud-minecraft
- **cloud-discord/cloud-jda**: JDA v4.2.0_207+ implementation of cloud - **cloud-discord/cloud-jda**: JDA v4.2.0_207+ implementation of cloud
- **cloud-discord/cloud-javacord**: Javacord v3.1.1+ implementation of cloud - **cloud-discord/cloud-javacord**: Javacord v3.1.1+ implementation of cloud
@ -168,6 +169,8 @@ dependencies {
} }
``` ```
To shade and relocate cloud use [Gradle Shadow](https://github.com/johnrengelman/shadow).
Replace `PLATFORM` with your platform of choice. We currently support: `bukkit`, `paper`, `bungee` and `velocity`for minecraft and `jda` and `javacord` for discord. All modules use the same versions. Replace `PLATFORM` with your platform of choice. We currently support: `bukkit`, `paper`, `bungee` and `velocity`for minecraft and `jda` and `javacord` for discord. All modules use the same versions.
More information about the Minecraft specific modules can be found [here](https://github.com/Sauilitired/cloud/tree/master/cloud-minecraft). More information about the Minecraft specific modules can be found [here](https://github.com/Sauilitired/cloud/tree/master/cloud-minecraft).

View file

@ -10,18 +10,29 @@ This directory hosts Minecraft specific implementations of cloud. Their features
| `cloud-velocity` | Velocity 1.1.0 | 1.7+ | Yes | | `cloud-velocity` | Velocity 1.1.0 | 1.7+ | Yes |
| `cloud-cloudburst` | CloudBurst 1.0.0 | Bedrock 1.16.20+ | No | | `cloud-cloudburst` | CloudBurst 1.0.0 | Bedrock 1.16.20+ | No |
There is also a `cloud-minecraft-extras` module that contains a few extra minecraft related features
## cloud-bukkit ## cloud-bukkit
Bukkit mappings for cloud. If `commodore` is present on the classpath and the server is running at least version 1.13+, Brigadier mappings will be available. Bukkit mappings for cloud. If `commodore` is present on the classpath and the server is running at least version 1.13+, Brigadier mappings will be available.
### dependency ### dependency
**maven**:
```xml ```xml
<dependency> <dependency>
<groupId>cloud.commandframework</groupId> <groupId>cloud.commandframework</groupId>
<artifactId>cloud-bukkit</artifactId> <artifactId>cloud-bukkit</artifactId>
<version>0.2.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
</dependency> </dependency>
``` ```
**gradle**:
```groovy
dependencies {
implementation 'cloud.commandframework:cloud-bukkit:1.0.0-SNAPSHOT'
}
```
### setup ### setup
Simply do: Simply do:
```java ```java
@ -32,6 +43,8 @@ The `forwardMapper` is a function that maps your chosen sender type to Bukkit's
### commodore ### commodore
To use commodore, include it as a dependency: To use commodore, include it as a dependency:
**maven**:
```xml ```xml
<dependency> <dependency>
<groupId>me.lucko</groupId> <groupId>me.lucko</groupId>
@ -40,6 +53,13 @@ To use commodore, include it as a dependency:
</dependency> </dependency>
``` ```
**gradle**:
```groovy
dependencies {
implementation 'me.lucko:commodore:1.9'
}
```
Then initialize the commodore mappings using: Then initialize the commodore mappings using:
```java ```java
try { try {
@ -56,19 +76,25 @@ You can check whether or not the running server supports Brigadier, by using `bu
## cloud-paper ## cloud-paper
An example plugin using the `cloud-paper` API can be found [here](https://github.com/Sauilitired/cloud/tree/master/cloud-minecraft/cloud-bukkit).
`cloud-paper`works on all Bukkit derivatives and has graceful fallbacks for cases where Paper specific features are missing. It is initialized the same way as the Bukkit manager, except `PaperCommandManager`is used instead. When using Paper 1.15+ Brigadier mappings are available even without commodore present. `cloud-paper`works on all Bukkit derivatives and has graceful fallbacks for cases where Paper specific features are missing. It is initialized the same way as the Bukkit manager, except `PaperCommandManager`is used instead. When using Paper 1.15+ Brigadier mappings are available even without commodore present.
### dependency ### dependency
**maven**:
```xml ```xml
<dependency> <dependency>
<groupId>cloud.commandframework</groupId> <groupId>cloud.commandframework</groupId>
<artifactId>cloud-paper</artifactId> <artifactId>cloud-paper</artifactId>
<version>0.2.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
</dependency> </dependency>
``` ```
**gradle**:
```groovy
dependencies {
implementation 'cloud.commandframework:cloud-paper:1.0.0-SNAPSHOT'
}
```
### asynchronous completions ### asynchronous completions
`cloud-paper`supports asynchronous completions when running on Paper. First check if the capability is present, by using `paperCommandManager.queryCapability(CloudBukkitCapabilities.ASYNCHRONOUS_COMPLETION)` and then initialize the asynchronous completion listener by using `paperCommandManager.registerAsynchronousCompletions()`. `cloud-paper`supports asynchronous completions when running on Paper. First check if the capability is present, by using `paperCommandManager.queryCapability(CloudBukkitCapabilities.ASYNCHRONOUS_COMPLETION)` and then initialize the asynchronous completion listener by using `paperCommandManager.registerAsynchronousCompletions()`.
@ -76,14 +102,22 @@ An example plugin using the `cloud-paper` API can be found [here](https://github
BungeeCord mappings for cloud. BungeeCord mappings for cloud.
### dependency ### dependency
**maven**:
```xml ```xml
<dependency> <dependency>
<groupId>cloud.commandframework</groupId> <groupId>cloud.commandframework</groupId>
<artifactId>cloud-bungee</artifactId> <artifactId>cloud-bungee</artifactId>
<version>0.2.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
</dependency> </dependency>
``` ```
**gradle**:
```groovy
dependencies {
implementation 'cloud.commandframework:cloud-bungee:1.0.0-SNAPSHOT'
}
```
### setup ### setup
Simply do: Simply do:
```java ```java
@ -96,19 +130,54 @@ The `forwardMapper` is a function that maps your chosen sender type to Bungee's
cloud mappings for Velocity 1.1.0-SNAPSHOT. cloud mappings for Velocity 1.1.0-SNAPSHOT.
An example plugin using the `cloud-velocity` API can be found [here](https://github.com/Sauilitired/cloud/tree/master/cloud-minecraft/cloud-velocity-test).
### dependency ### dependency
**maven**:
```xml ```xml
<dependency> <dependency>
<groupId>cloud.commandframework</groupId> <groupId>cloud.commandframework</groupId>
<artifactId>cloud-velocity</artifactId> <artifactId>cloud-velocity</artifactId>
<version>0.2.0-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
</dependency> </dependency>
``` ```
**gradle**:
```groovy
dependencies {
implementation 'cloud.commandframework:cloud-velocity:1.0.0-SNAPSHOT'
}
```
Simply do: Simply do:
```java ```java
final VelocityCommandManager<YourSender> bukkitCommandManager = new VelocityCommandManager<>( final VelocityCommandManager<YourSender> velocityCommandManager = new VelocityCommandManager<>(
proxyServer, yourExecutionCoordinator, forwardMapper, backwardsMapper); proxyServer, yourExecutionCoordinator, forwardMapper, backwardsMapper);
``` ```
The `forwardMapper` is a function that maps your chosen sender type to Velocity's [CommandSource](https://jd.velocitypowered.com/1.1.0/com/velocitypowered/api/command/CommandSource.html), and the `backwardsMapper`does the opposite. In the case that you don't need a custom sender type, you can simply use `CommandSource`as the generic type and pass `Function.identity()` as the forward and backward mappers. The `forwardMapper` is a function that maps your chosen sender type to Velocity's [CommandSource](https://jd.velocitypowered.com/1.1.0/com/velocitypowered/api/command/CommandSource.html), and the `backwardsMapper`does the opposite. In the case that you don't need a custom sender type, you can simply use `CommandSource`as the generic type and pass `Function.identity()` as the forward and backward mappers.
## cloud-cloudburst
cloud mappings for CloudBurst 1.0.0-SNAPSHOT.
### dependency
**maven**:
```xml
<dependency>
<groupId>cloud.commandframework</groupId>
<artifactId>cloud-cloudburst</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
```
**gradle**:
```groovy
dependencies {
implementation 'cloud.commandframework:cloud-velocity:1.0.0-SNAPSHOT'
}
```
Simply do:
```java
final CloudburstCommandManager<YourSender> cloudburstCommandManager = new CloudburstCommandManager<>(
yourPlugin, yourExecutionCoordinator, forwardMapper, backwardsMapper);
```
The `forwardMapper` is a function that maps your chosen sender type to Cloudbursts's [CommandSender](https://ci.nukkitx.com/job/NukkitX/job/Nukkit/job/master/javadoc/cn/nukkit/command/CommandSender.html), and the `backwardsMapper`does the opposite. In the case that you don't need a custom sender type, you can simply use `CommandSource`as the generic type and pass `Function.identity()` as the forward and backward mappers.