Change ProtocolLib update message to send for "libsdisguises.update" as requested by <@310973818099466242>

This commit is contained in:
libraryaddict 2023-04-27 10:54:57 +12:00
parent fbf6ee0845
commit 7b760fd7a1
3 changed files with 3 additions and 3 deletions

View File

@ -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);
}

View File

@ -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

View File

@ -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() {