docs: slight tidy-up of README

dependabot/gradle/org.projectlombok-lombok-1.18.34
William 5 months ago
parent 25ad664a36
commit 665389482c
No known key found for this signature in database

@ -85,8 +85,6 @@ public class ExampleCommand extends PaperCommand {
Target `uniform-common` and extend the `Command` class. You'll want to use `BaseCommand#getUser` to get a platform-agnostic User from which you can acquire the adventure `Audience` to send messages to. Target `uniform-common` and extend the `Command` class. You'll want to use `BaseCommand#getUser` to get a platform-agnostic User from which you can acquire the adventure `Audience` to send messages to.
```java ```java
import java.awt.*;
public class ExampleCrossPlatCommand extends Command { public class ExampleCrossPlatCommand extends Command {
public ExampleCrossPlatCommand() { public ExampleCrossPlatCommand() {
super("example", "cross-platform"); super("example", "cross-platform");
@ -94,7 +92,8 @@ public class ExampleCrossPlatCommand extends Command {
@Override @Override
public <S> void provide(@NotNull BaseCommand<S> command) { public <S> void provide(@NotNull BaseCommand<S> command) {
// What gets executed when no args are passed. For tidiness, feel free to delegate this stuff to methods! // What gets executed when no args are passed.
// For tidiness, feel free to delegate this stuff to methods!
command.setDefaultExecutor((context) -> { command.setDefaultExecutor((context) -> {
// Use command.getUser(context.getSource()) to get the user // Use command.getUser(context.getSource()) to get the user
final Audience user = command.getUser(context.getSource()).getAudience(); final Audience user = command.getUser(context.getSource()).getAudience();

Loading…
Cancel
Save