AuthMe correct API-Hook

This commit is contained in:
Jascha Starke 2013-09-21 23:23:40 +02:00
parent f322468d40
commit 6101a62918

View file

@ -2,8 +2,7 @@ package de.jaschastarke.minecraft.limitedcreative.hooks;
import org.bukkit.entity.Player;
import uk.org.whoami.authme.cache.auth.PlayerCache;
import uk.org.whoami.authme.api.API;
import de.jaschastarke.minecraft.limitedcreative.Hooks;
import de.jaschastarke.minecraft.limitedcreative.LimitedCreative;
@ -12,7 +11,7 @@ public class AuthMeHooks {
Hooks.IsLoggedIn.register(new PlayerCheckHooker.Check() {
@Override
public boolean test(Player player) {
boolean li = PlayerCache.getInstance().isAuthenticated(player.getName().toLowerCase());
boolean li = API.isAuthenticated(player);
if (plugin.isDebug()) // not nessesary, but so no string concation without debug needed
plugin.getLog().debug("AuthMe: "+player.getName()+": logged in: "+li);
return li;