Fix '/as addfriend' not allowing you to add players that are playing for the first time

- Fixes #297
This commit is contained in:
Thijs Wiefferink 2017-04-02 22:34:02 +02:00
parent a5105af3ad
commit a973e254e6

View File

@ -92,7 +92,7 @@ public class AddfriendCommand extends CommandAreaShop {
if(sender.hasPermission("areashop.addfriend") && sender instanceof Player) {
if(region.isOwner((Player)sender)) {
OfflinePlayer friend = Bukkit.getOfflinePlayer(args[1]);
if(friend.getLastPlayed() == 0 && !plugin.getConfig().getBoolean("addFriendNotExistingPlayers")) {
if(friend.getLastPlayed() == 0 && !friend.isOnline() && !plugin.getConfig().getBoolean("addFriendNotExistingPlayers")) {
plugin.message(sender, "addfriend-notVisited", args[1], region);
return;
}