Skip to content

Commit

Permalink
Fixed example command having errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Zffu committed Jul 20, 2024
1 parent 80713c6 commit 52c52db
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@
// In this example we create a invoker gated command.
public class CustomCommandExample implements Command, TypeGatedCommand {

private String[] names = new String[]{"test"};
private List<InvokerType> allowedInvokers = Arrays.asList(new InvokerType[]{InvokerType.PLAYER}); // Only allows players to use our command, this will not matter at all if the custom validator doesn't include a check for it

@Override
public String[] getNames() {
return this.names;
public String getPrimaryName() {
return "test";
}

@Override
public String[] getAliases() {
return new String[0];
}

@Override
Expand Down

0 comments on commit 52c52db

Please sign in to comment.