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