Increase the online state lookup speed. Improves MassiveCraft/Factions#423

This commit is contained in:
Olof Larsson 2013-09-22 11:32:51 +02:00
parent 4fb97cb0ae
commit 824e1640c5

View File

@ -4,10 +4,8 @@ import java.io.File;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer; import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import com.massivecraft.mcore.util.MUtil; import com.massivecraft.mcore.util.MUtil;
import com.massivecraft.mcore.util.SenderUtil;
public class PlayedMixinDefault extends PlayedMixinAbstract public class PlayedMixinDefault extends PlayedMixinAbstract
{ {
@ -26,8 +24,7 @@ public class PlayedMixinDefault extends PlayedMixinAbstract
public boolean isOnline(String senderId) public boolean isOnline(String senderId)
{ {
if (senderId == null) return false; if (senderId == null) return false;
CommandSender sender = SenderUtil.getSender(senderId); return Mixin.getOnlineSenderIds().contains(senderId);
return sender != null;
} }
@Override @Override