This commit is contained in:
Ben 2016-03-08 17:44:15 +00:00
parent 0ff434cf91
commit 036565abb7

View File

@ -5,11 +5,13 @@ import java.sql.SQLException;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;
import mineplex.core.MiniClientPlugin;
import mineplex.core.account.CoreClientManager;
import mineplex.core.account.event.ClientWebResponseEvent;
import mineplex.core.common.util.UtilServer;
import mineplex.core.vanish.commands.VanishCommand;
import mineplex.core.vanish.events.PreVanishEvent;
@ -44,7 +46,7 @@ public class Vanish extends MiniClientPlugin<VanishClient>
if (event.isCancelled())
{
return;
return false;
}
Get(caller).State = enabled;
@ -52,10 +54,18 @@ public class Vanish extends MiniClientPlugin<VanishClient>
return enabled;
}
@EventHandler
public void ClientLoad(ClientWebResponseEvent event)
@EventHandler(priority = EventPriority.LOWEST)
public void ClientLoad(AsyncPlayerPreLoginEvent event)
{
Get(event.get
_clientManager.getRepository().getAccountId(event.getUniqueId(), accountId -> {
Get(event.getName()).State = _repository.getStatus(accountId);
});
}
@EventHandler(priority = EventPriority.LOWEST)
public void ClientLoad(PlayerJoinEvent event)
{
Get(
}
public String getQuery(int accountId, String uuid, String name)