mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-10-31 15:49:56 +01:00
Check a boolean is a quickest way than check database :)
This commit is contained in:
parent
7b4ea381ef
commit
2cd7bc8512
@ -66,12 +66,12 @@ public class AuthMePlayerListener implements Listener {
|
|||||||
|
|
||||||
private void handleChat(AsyncPlayerChatEvent event) {
|
private void handleChat(AsyncPlayerChatEvent event) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
|
if (Settings.isChatAllowed)
|
||||||
|
return;
|
||||||
if (Utils.checkAuth(player))
|
if (Utils.checkAuth(player))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Settings.isChatAllowed) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
|
||||||
if (plugin.database.isAuthAvailable(player.getName().toLowerCase())) {
|
if (plugin.database.isAuthAvailable(player.getName().toLowerCase())) {
|
||||||
|
Loading…
Reference in New Issue
Block a user