Allow sign usage on first join

This commit is contained in:
CmdrKittens
2020-08-11 15:33:36 -04:00
parent 256fc667fc
commit af49c72c3d
@@ -114,7 +114,7 @@ public class SignListener implements Listener {
boolean self = PlayerVaults.getInstance().getSigns().getBoolean(world + ";;" + x + ";;" + y + ";;" + z + ".self", false);
String owner = self ? player.getName() : PlayerVaults.getInstance().getSigns().getString(world + ";;" + x + ";;" + y + ";;" + z + ".owner");
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(owner != null ? owner : event.getPlayer().getName()); // Not best way but :\
if (offlinePlayer == null || !offlinePlayer.hasPlayedBefore()) {
if (offlinePlayer == null || (!offlinePlayer.isOnline() && !offlinePlayer.hasPlayedBefore())) {
player.sendMessage(Lang.TITLE.toString() + Lang.VAULT_DOES_NOT_EXIST.toString());
return;
}