mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-25 09:59:49 -05:00
Cleanup code
This commit is contained in:
1 parent
ea2ba8f113
commit
9bdb9f02a4
7 files changed
+10
-12
No files matched your search
@@ -436,10 +436,9 @@ public class QuickShop extends JavaPlugin {
|
||||
core = new Economy_Vault(this);
|
||||
Util.debugLog("Now using the Vault economy system.");
|
||||
if (getConfig().getDouble("tax", 0) > 0) {
|
||||
|
||||
try {
|
||||
String taxAccount = getConfig().getString("tax-account", "tax");
|
||||
if (!(taxAccount == null || taxAccount.isEmpty())) {
|
||||
if (!taxAccount.isEmpty()) {
|
||||
OfflinePlayer tax;
|
||||
if (Util.isUUID(taxAccount)) {
|
||||
tax = Bukkit.getOfflinePlayer(UUID.fromString(taxAccount));
|
||||
|
||||
@@ -131,7 +131,7 @@ public class InternalListener implements Listener {
|
||||
+ " for"
|
||||
+ Util.getItemStackName(event.getShop().getItem())
|
||||
+ "x" +
|
||||
+event.getAmount()
|
||||
event.getAmount()
|
||||
+ " for "
|
||||
+ event.getBalance()
|
||||
+ " ("
|
||||
|
||||
@@ -58,7 +58,7 @@ public class TownyIntegration extends QSIntegratedPlugin implements Listener {
|
||||
private final boolean deleteShopOnLeave;
|
||||
private final boolean deleteShopOnPlotClear;
|
||||
private boolean isNewVersion;
|
||||
private boolean whiteList;
|
||||
private final boolean whiteList;
|
||||
|
||||
|
||||
public TownyIntegration(QuickShop plugin) {
|
||||
|
||||
@@ -103,7 +103,7 @@ public class ShopManager {
|
||||
// disable tax account
|
||||
cacheTaxAccount = null;
|
||||
}
|
||||
String uAccount = plugin.getConfig().getString("unlimited-shop-owner-change-account");
|
||||
String uAccount = plugin.getConfig().getString("unlimited-shop-owner-change-account", "quickshop");
|
||||
if (Util.isUUID(uAccount)) {
|
||||
cacheUnlimitedShopAccount = new Trader(uAccount, Bukkit.getOfflinePlayer(UUID.fromString(uAccount)));
|
||||
} else {
|
||||
|
||||
@@ -98,8 +98,6 @@ public class QuickShopItemMatcherImpl implements ItemMatcher {
|
||||
}
|
||||
//For performance, we just check really equals in each index,check isn't contain or match will cost n^n time in most
|
||||
for (int i = 0; i < requireStack.length; i++) {
|
||||
//IDEA bug, ignore NPE tips
|
||||
//noinspection ConstantConditions
|
||||
if ((requireStack[i] != null) && (givenStack[i] != null) &&
|
||||
(requireStack[i].getAmount() != givenStack[i].getAmount())) {
|
||||
return false;
|
||||
|
||||
@@ -85,6 +85,7 @@ public class Paste {
|
||||
finalReport.append("\tEconomy System: ");
|
||||
try {
|
||||
EconomyCore economyCore = plugin.getEconomy().getCore();
|
||||
//noinspection SwitchStatementWithTooFewBranches
|
||||
switch (Economy.getNowUsing()) {
|
||||
case VAULT:
|
||||
finalReport
|
||||
|
||||
Reference in new issue
Block a user