added the permission check, version update, README update
This commit is contained in:
parent
389ccd5adf
commit
06691820c0
@ -6,6 +6,6 @@
|
||||
- No Setup required, but you can still customize it with the config file
|
||||
- LuckPerms Prefix and Suffix Support
|
||||
- Velocity only
|
||||
- Reload command: "/vmessage reload", permission: "*"
|
||||
- Reload command: "/vmessage reload", permission: "vmessage.reload"
|
||||
- Global message command: "/sendall"
|
||||
- You can also check my Bukkit plugin https://github.com/FeuSalamander/MiniWalls
|
||||
|
@ -31,7 +31,7 @@ public final class ReloadCommand implements SimpleCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(final Invocation invocation) {
|
||||
return invocation.source().hasPermission("vmessage.command");
|
||||
return invocation.source().hasPermission("vmessage.reload");
|
||||
}
|
||||
|
||||
private static final List<String> suggestion = List.of("reload");
|
||||
|
@ -15,6 +15,9 @@ public final class SendCommand implements SimpleCommand {
|
||||
|
||||
@Override
|
||||
public void execute(final Invocation invocation) {
|
||||
if(!hasPermission(invocation)){
|
||||
return;
|
||||
}
|
||||
final CommandSource source = invocation.source();
|
||||
final String[] args = invocation.arguments();
|
||||
if (args.length == 0) {
|
||||
|
@ -16,7 +16,7 @@ import java.nio.file.Path;
|
||||
@Plugin(
|
||||
id = "vmessage",
|
||||
name = "Vmessage",
|
||||
version = "1.5",
|
||||
version = "1.5.1",
|
||||
description = "A velocity plugin that creates a multi server chat for the network",
|
||||
authors = {"FeuSalamander"},
|
||||
dependencies = { @Dependency(id = "luckperms", optional = true) }
|
||||
|
Loading…
Reference in New Issue
Block a user