Skip to content

Commit c6959b7

Browse files
committed
reformat & clean up
1 parent 74e3545 commit c6959b7

File tree

59 files changed

+203
-150
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+203
-150
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@
6161
import org.maxgamer.quickshop.chat.platform.minedown.BungeeQuickChat;
6262
import org.maxgamer.quickshop.command.JavaCommandManager;
6363
import org.maxgamer.quickshop.database.*;
64-
import org.maxgamer.quickshop.economy.*;
64+
import org.maxgamer.quickshop.economy.Economy_GemsEconomy;
65+
import org.maxgamer.quickshop.economy.Economy_TNE;
66+
import org.maxgamer.quickshop.economy.Economy_Vault;
6567
import org.maxgamer.quickshop.event.QSReloadEvent;
6668
import org.maxgamer.quickshop.integration.JavaIntegrationManager;
6769
import org.maxgamer.quickshop.integration.worldguard.WorldGuardIntegration;
@@ -1897,12 +1899,12 @@ private void updateConfig(int selectedVersion) throws IOException {
18971899
getConfig().set("purge.banned", true);
18981900
getConfig().set("purge.skip-op", true);
18991901
getConfig().set("purge.return-create-fee", true);
1900-
getConfig().set("shop.use-fast-shop-search-algorithm",null);
1902+
getConfig().set("shop.use-fast-shop-search-algorithm", null);
19011903
getConfig().set("config-version", ++selectedVersion);
19021904
}
1903-
if(selectedVersion == 142){
1904-
getConfig().set("disabled-languages",null);
1905-
getConfig().set("enabled-languages",Collections.singletonList("*"));
1905+
if (selectedVersion == 142) {
1906+
getConfig().set("disabled-languages", null);
1907+
getConfig().set("enabled-languages", Collections.singletonList("*"));
19061908
getConfig().set("config-version", ++selectedVersion);
19071909
}
19081910

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
import org.bukkit.plugin.RegisteredServiceProvider;
2424
import org.jetbrains.annotations.NotNull;
2525
import org.jetbrains.annotations.Nullable;
26-
import org.maxgamer.quickshop.database.AbstractDatabaseCore;
2726
import org.maxgamer.quickshop.api.economy.EconomyCore;
28-
import org.maxgamer.quickshop.localization.game.game.GameLanguage;
2927
import org.maxgamer.quickshop.api.shop.ItemMatcher;
28+
import org.maxgamer.quickshop.database.AbstractDatabaseCore;
29+
import org.maxgamer.quickshop.localization.game.game.GameLanguage;
3030

3131
/**
3232
* ServiceInjector used for "Replaceable Modules" features that allow 3rd party QuickShop addon

src/main/java/org/maxgamer/quickshop/api/command/CommandManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ default <T1, T2 extends T1> T2 capture(T1 type) {
5454
@NotNull Command command,
5555
@NotNull String commandLabel,
5656
@NotNull String[] cmdArg);
57+
5758
enum Action {
5859
EXECUTE("execute"),
5960
TAB_COMPLETE("tab-complete");

src/main/java/org/maxgamer/quickshop/api/database/WarpedResultSet.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@
2424

2525
public interface WarpedResultSet extends AutoCloseable {
2626
void close() throws SQLException;
27+
2728
ResultSet getResultSet();
2829
}

src/main/java/org/maxgamer/quickshop/api/integration/IntegrationManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import java.util.List;
66
import java.util.Map;
77

8-
public interface IntegrationManager{
8+
public interface IntegrationManager {
99
Map<String, IntegratedPlugin> getIntegrationMap();
1010

1111
List<IntegratedPlugin> getIntegrations();
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package org.maxgamer.quickshop.api.integration;
22

3-
public class InvalidIntegratedPluginClassException extends IllegalArgumentException {
4-
public InvalidIntegratedPluginClassException() {
5-
super();
6-
}
3+
public class InvalidIntegratedPluginClassException extends IllegalArgumentException {
4+
public InvalidIntegratedPluginClassException() {
5+
super();
6+
}
77

8-
public InvalidIntegratedPluginClassException(String s) {
9-
super(s);
10-
}
8+
public InvalidIntegratedPluginClassException(String s) {
9+
super(s);
10+
}
1111

12-
public InvalidIntegratedPluginClassException(String message, Throwable cause) {
13-
super(message, cause);
14-
}
12+
public InvalidIntegratedPluginClassException(String message, Throwable cause) {
13+
super(message, cause);
14+
}
1515
}
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package org.maxgamer.quickshop.api.shop;
22

33
public interface PriceLimiterCheckResult {
4-
PriceLimiterStatus getStatus();
5-
double getMin();
6-
double getMax();
4+
PriceLimiterStatus getStatus();
5+
6+
double getMin();
7+
8+
double getMax();
79
}

src/main/java/org/maxgamer/quickshop/api/shop/Shop.java

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@
4141
import java.util.UUID;
4242

4343
public interface Shop {
44-
NamespacedKey SHOP_NAMESPACED_KEY = new NamespacedKey(QuickShop.getInstance(),"shopsign");
44+
NamespacedKey SHOP_NAMESPACED_KEY = new NamespacedKey(QuickShop.getInstance(), "shopsign");
4545
String SHOP_SIGN_PATTERN = "§d§o ";
46+
4647
/**
4748
* Add x ItemStack to the shop inventory
4849
*
@@ -545,38 +546,40 @@ default List<ComponentPackage> getSignText(String locale) {
545546

546547
/**
547548
* Claim a sign as shop sign (modern method)
549+
*
548550
* @param sign The shop sign
549551
*/
550552
void claimShopSign(@NotNull Sign sign);
551553

552554
/**
553555
* Checks if a Sign is a ShopSign
556+
*
554557
* @param sign Target sign
555558
* @return Is shop info sign
556559
*/
557-
default boolean isShopSign(@NotNull Sign sign){
558-
return isShopSign(sign,null);
560+
default boolean isShopSign(@NotNull Sign sign) {
561+
return isShopSign(sign, null);
559562
}
560563

561564
/**
562565
* Checks if a Sign is a ShopSign and also check if a ShopSign is specific shop's ShopSign.
566+
*
563567
* @param sign Target sign
564568
* @param shop Target shop (null if you don't want check sign owner)
565-
*
566569
* @return Is specific shop's ShopSign.
567570
*/
568-
default boolean isShopSign(@NotNull Sign sign, @Nullable Shop shop){
571+
default boolean isShopSign(@NotNull Sign sign, @Nullable Shop shop) {
569572
// Check for new shop sign
570573
String[] lines = sign.getLines();
571574
if (lines[0].isEmpty() && lines[1].isEmpty() && lines[2].isEmpty() && lines[3].isEmpty()) {
572575
return true;
573576
}
574577

575578
// Check for exists shop sign (modern)
576-
if(sign.getPersistentDataContainer().has(SHOP_NAMESPACED_KEY, ShopSignPersistentDataType.INSTANCE)){
577-
if(shop != null){
578-
ShopSignStorage shopSignStorage = sign.getPersistentDataContainer().get(SHOP_NAMESPACED_KEY,ShopSignPersistentDataType.INSTANCE);
579-
return Objects.equals(shopSignStorage, new ShopSignStorage(getLocation().getWorld().getName(),getLocation().getBlockX(),getLocation().getBlockY(),getLocation().getBlockZ()));
579+
if (sign.getPersistentDataContainer().has(SHOP_NAMESPACED_KEY, ShopSignPersistentDataType.INSTANCE)) {
580+
if (shop != null) {
581+
ShopSignStorage shopSignStorage = sign.getPersistentDataContainer().get(SHOP_NAMESPACED_KEY, ShopSignPersistentDataType.INSTANCE);
582+
return Objects.equals(shopSignStorage, new ShopSignStorage(getLocation().getWorld().getName(), getLocation().getBlockX(), getLocation().getBlockY(), getLocation().getBlockZ()));
580583
}
581584
return true;
582585
}
@@ -586,14 +589,14 @@ default boolean isShopSign(@NotNull Sign sign, @Nullable Shop shop){
586589
return true;
587590
} else {
588591
String header = lines[0];
589-
String adminShopHeader = QuickShop.getInstance().text().of("signs.header",QuickShop.getInstance().text().of("admin-shop").forLocale()).forLocale();
592+
String adminShopHeader = QuickShop.getInstance().text().of("signs.header", QuickShop.getInstance().text().of("admin-shop").forLocale()).forLocale();
590593
String signHeaderUsername = QuickShop.getInstance().text().of("signs.header", this.ownerName(true)).forLocale();
591594
if (header.contains(adminShopHeader) || header.contains(signHeaderUsername)) {
592595
return true;
593596
//TEXT SIGN
594597
//continue
595598
} else {
596-
adminShopHeader =QuickShop.getInstance().text().of("signs.header", QuickShop.getInstance().text().of("admin-shop").forLocale(), "").forLocale();
599+
adminShopHeader = QuickShop.getInstance().text().of("signs.header", QuickShop.getInstance().text().of("admin-shop").forLocale(), "").forLocale();
597600
signHeaderUsername = QuickShop.getInstance().text().of("signs.header", this.ownerName(true), "").forLocale();
598601
adminShopHeader = ChatColor.stripColor(adminShopHeader).trim();
599602
signHeaderUsername = ChatColor.stripColor(signHeaderUsername).trim();

src/main/java/org/maxgamer/quickshop/chat/platform/minedown/BungeeQuickChat.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
import org.maxgamer.quickshop.QuickShop;
3232
import org.maxgamer.quickshop.api.chat.QuickChat;
3333
import org.maxgamer.quickshop.api.chat.QuickComponent;
34-
import org.maxgamer.quickshop.chat.QuickComponentImpl;
3534
import org.maxgamer.quickshop.api.shop.Shop;
35+
import org.maxgamer.quickshop.chat.QuickComponentImpl;
3636
import org.maxgamer.quickshop.util.MsgUtil;
3737
import org.maxgamer.quickshop.util.ReflectFactory;
3838
import org.maxgamer.quickshop.util.Util;

src/main/java/org/maxgamer/quickshop/command/subcommand/SubCommand_Clean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
import org.jetbrains.annotations.NotNull;
2525
import org.maxgamer.quickshop.QuickShop;
2626
import org.maxgamer.quickshop.api.command.CommandHandler;
27-
import org.maxgamer.quickshop.shop.ContainerShop;
2827
import org.maxgamer.quickshop.api.shop.Shop;
28+
import org.maxgamer.quickshop.shop.ContainerShop;
2929
import org.maxgamer.quickshop.util.MsgUtil;
3030
import org.maxgamer.quickshop.util.Util;
3131
import org.maxgamer.quickshop.util.logging.container.ShopRemoveLog;

0 commit comments

Comments
 (0)