Cancel commands when authenticating with 2FA

This commit is contained in:
cnr 2017-01-05 10:44:03 -07:00
parent fa6a60981c
commit a2472f45b4
1 changed files with 2 additions and 2 deletions

View File

@ -294,13 +294,13 @@ public class TwoFactorAuth extends MiniClientPlugin<TwoFactorData>
}
}
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
@EventHandler(priority = EventPriority.LOWEST)
public void onCommand(PlayerCommandPreprocessEvent event)
{
Player player = event.getPlayer();
if (player.hasMetadata(TFA_SETUP) || player.hasMetadata(TFA_AUTHENTICATING))
{
event.setMessage("");
event.setMessage("/");
event.setCancelled(true);
}
}