mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2025-03-02 04:01:26 +01:00
Change ProtocolLib update message to send for "libsdisguises.update" as requested by <@310973818099466242>
This commit is contained in:
parent
fbf6ee0845
commit
7b760fd7a1
@ -83,7 +83,7 @@ public abstract class DisguiseBaseCommand implements CommandExecutor {
|
||||
String requiredProtocolLib = StringUtils.join(DisguiseUtilities.getProtocolLibRequiredVersion(), " or build #");
|
||||
String version = ProtocolLibrary.getPlugin().getDescription().getVersion();
|
||||
|
||||
if (DisguiseUtilities.isProtocolLibOutdated() && sender.isOp()) {
|
||||
if (DisguiseUtilities.isProtocolLibOutdated() && sender.hasPermission("libsdisguises.update")) {
|
||||
DisguiseUtilities.sendProtocolLibUpdateMessage(sender, version, requiredProtocolLib);
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ public class LDUpdateProtocolLib implements LDCommand {
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(CommandSender sender) {
|
||||
return sender.isOp() || sender.hasPermission("minecraft.command.op");
|
||||
return sender.isOp() || sender.hasPermission("libsdisguises.update") || sender.hasPermission("minecraft.command.op");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -401,7 +401,7 @@ public class DisguiseListener implements Listener {
|
||||
String requiredProtocolLib = StringUtils.join(DisguiseUtilities.getProtocolLibRequiredVersion(), " or build #");
|
||||
String version = ProtocolLibrary.getPlugin().getDescription().getVersion();
|
||||
|
||||
if (DisguiseUtilities.isProtocolLibOutdated() && p.isOp()) {
|
||||
if (DisguiseUtilities.isProtocolLibOutdated() && p.hasPermission("libsdisguises.update")) {
|
||||
DisguiseUtilities.sendProtocolLibUpdateMessage(p, version, requiredProtocolLib);
|
||||
|
||||
new BukkitRunnable() {
|
||||
|
Loading…
Reference in New Issue
Block a user