Fix problem with '/as addfriend' denying first-joined players

Before it checked if the player had played before on the server in order
to check if the friend will get accepted, but this fails when the player
is playing for the first time. This has been repaired.
This commit is contained in:
Thijs Wiefferink 2015-06-13 22:06:34 +02:00
parent 1a2d755727
commit c95f4e1c6c

View File

@ -101,7 +101,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.hasPlayedBefore()) {
if(friend.getLastPlayed() == 0) {
plugin.message(sender, "addfriend-notVisited", args[1]);
return;
}