Skip to content

Commit c389464

Browse files
committed
Remove unnecessary hasPlayedBefore check
1 parent a8c2bbf commit c389464

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

src/main/java/org/maxgamer/quickshop/QuickShop.java

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -441,26 +441,24 @@ public boolean loadEcon() {
441441
} else {
442442
tax = Bukkit.getOfflinePlayer(Objects.requireNonNull(taxAccount));
443443
}
444-
if (!tax.hasPlayedBefore()) {
445-
Economy_Vault vault = (Economy_Vault) core;
446-
if (vault.isValid()) {
447-
if (!Objects.requireNonNull(vault.getVault()).hasAccount(tax)) {
448-
try {
449-
Util.debugLog("Tax account not exists! Creating...");
450-
getLogger().warning("QuickShop detected tax account not exists, we're trying to create one. If you see any errors, please change tax-account in config.yml to server owner in-game username");
451-
if (vault.getVault().createPlayerAccount(tax)) {
452-
getLogger().info("Tax account created.");
453-
} else {
454-
getLogger().warning("Cannot to create tax-account, please change tax-account in config.yml to server owner in-game username");
455-
}
456-
} catch (Exception ignored) {
457-
}
458-
if (!vault.getVault().hasAccount(tax)) {
459-
getLogger().warning("Tax account's player never played this server before, that may cause server lagg or economy system error, you should change that name. But if this warning not cause any issues, you can safety ignore this.");
444+
Economy_Vault vault = (Economy_Vault) core;
445+
if (vault.isValid()) {
446+
if (!Objects.requireNonNull(vault.getVault()).hasAccount(tax)) {
447+
try {
448+
Util.debugLog("Tax account not exists! Creating...");
449+
getLogger().warning("QuickShop detected tax account not exists, we're trying to create one. If you see any errors, please change tax-account in config.yml to server owner in-game username");
450+
if (vault.getVault().createPlayerAccount(tax)) {
451+
getLogger().info("Tax account created.");
452+
} else {
453+
getLogger().warning("Cannot to create tax-account, please change tax-account in config.yml to server owner in-game username");
460454
}
455+
} catch (Exception ignored) {
456+
}
457+
if (!vault.getVault().hasAccount(tax)) {
458+
getLogger().warning("Tax account's player never played this server before, that may cause server lagg or economy system error, you should change that name. But if this warning not cause any issues, you can safety ignore this.");
461459
}
462-
463460
}
461+
464462
}
465463
}
466464
} catch (Exception ignored) {

0 commit comments

Comments
 (0)