mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-03 01:00:18 +01:00
Fixed VersionCommand is not using backwards compatible players method
This commit is contained in:
parent
6aa22f80ce
commit
e57e457b62
@ -3,14 +3,14 @@ package fr.xephi.authme.command.executable.authme;
|
|||||||
import fr.xephi.authme.AuthMe;
|
import fr.xephi.authme.AuthMe;
|
||||||
import fr.xephi.authme.command.CommandService;
|
import fr.xephi.authme.command.CommandService;
|
||||||
import fr.xephi.authme.command.ExecutableCommand;
|
import fr.xephi.authme.command.ExecutableCommand;
|
||||||
import org.bukkit.Bukkit;
|
import static fr.xephi.authme.settings.properties.PluginSettings.HELP_HEADER;
|
||||||
import org.bukkit.ChatColor;
|
import fr.xephi.authme.util.Utils;
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static fr.xephi.authme.settings.properties.PluginSettings.HELP_HEADER;
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public class VersionCommand implements ExecutableCommand {
|
public class VersionCommand implements ExecutableCommand {
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ public class VersionCommand implements ExecutableCommand {
|
|||||||
private static boolean isPlayerOnline(String minecraftName) {
|
private static boolean isPlayerOnline(String minecraftName) {
|
||||||
// Note ljacqu 20151121: Generally you should use Utils#getOnlinePlayers to retrieve the list of online players.
|
// Note ljacqu 20151121: Generally you should use Utils#getOnlinePlayers to retrieve the list of online players.
|
||||||
// If it's only used in a for-each loop such as here, it's fine. For other purposes, go through the Utils class.
|
// If it's only used in a for-each loop such as here, it's fine. For other purposes, go through the Utils class.
|
||||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
for (Player player : Utils.getOnlinePlayers()) {
|
||||||
if (player.getName().equalsIgnoreCase(minecraftName)) {
|
if (player.getName().equalsIgnoreCase(minecraftName)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user