mirror of
https://github.com/NLthijs48/AreaShop.git
synced 2025-02-20 14:01:43 +01:00
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:
parent
1a2d755727
commit
c95f4e1c6c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user