Fix non-ops still getting PL update messages

This commit is contained in:
libraryaddict 2021-07-11 04:43:36 +12:00
parent 82d17f8b70
commit 06dc0baafe

View File

@ -396,13 +396,13 @@ public class DisguiseListener implements Listener {
String requiredProtocolLib = StringUtils.join(DisguiseUtilities.getProtocolLibRequiredVersion(), " or build #");
String version = ProtocolLibrary.getPlugin().getDescription().getVersion();
if (DisguiseUtilities.isProtocolLibOutdated()) {
if (DisguiseUtilities.isProtocolLibOutdated() && p.isOp()) {
DisguiseUtilities.sendProtocolLibUpdateMessage(p, version, requiredProtocolLib);
new BukkitRunnable() {
@Override
public void run() {
if (!p.isOnline() || !p.isOp()) {
if (!p.isOnline()) {
cancel();
return;
}