Skip to content

Commit

Permalink
Check permission commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Euphillya committed Dec 23, 2024
1 parent 9ed9795 commit 873d33e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions addons/OreGenerator/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ In this example, the default generator is set to "test". The generator named "te

### Commands

- `/skylliaore <player> <generator>`: Change the generator for a specific player.
- `/skylliaadmin generator <player> <generator>`: Change the generator for a specific player.

### Note on Generator Change

When changing the generator, there is a delay of approximately 30 seconds before the update takes effect due to caching.

### Permissions

- `skylliaore.use`: Permission to use the `/skylliaore` command.
- `skylliaore.use`: Permission to use the `/skylliaadmin generator` command.

## Contribution

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ public class OreCommands implements SubCommandInterface {

@Override
public boolean onCommand(@NotNull Plugin plugin, @NotNull CommandSender sender, @NotNull String[] args) {
if (!sender.hasPermission("skylliaore.use")) return true;
if (args.length < 2) {
sender.sendMessage(Component.text("Usage: /<command> <player> <generator>").color(NamedTextColor.RED));
sender.sendMessage(Component.text("Usage: /skylliaadmin generator <player> <generator>").color(NamedTextColor.RED));
return false;
}

Expand Down

0 comments on commit 873d33e

Please sign in to comment.