Skip to content

Commit 9bf3560

Browse files
committed
Cleanup
1 parent c825bb7 commit 9bf3560

File tree

58 files changed

+124
-124
lines changed

Some content is hidden

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

58 files changed

+124
-124
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ private void load3rdParty() {
380380
compatibilityTool.searchAndRegisterPlugins();
381381
if (this.display) {
382382
//VirtualItem support
383-
if (DisplayItem.getNowUsing() == DisplayType.VIRTUALITEM) {
383+
if (AbstractDisplayItem.getNowUsing() == DisplayType.VIRTUALITEM) {
384384
getLogger().info("Using Virtual Item display, loading ProtocolLib support...");
385385
Plugin protocolLibPlugin = Bukkit.getPluginManager().getPlugin("ProtocolLib");
386386
if (protocolLibPlugin != null && protocolLibPlugin.isEnabled()) {
@@ -391,7 +391,7 @@ private void load3rdParty() {
391391
saveConfig();
392392
}
393393
}
394-
if (DisplayItem.getNowUsing() == DisplayType.REALITEM) {
394+
if (AbstractDisplayItem.getNowUsing() == DisplayType.REALITEM) {
395395
getLogger().warning("You're using Real Display system and that may cause your server lagg, switch to Virtual Display system if you can!");
396396
if (Bukkit.getPluginManager().getPlugin("ClearLag") != null) {
397397
try {
@@ -623,7 +623,7 @@ public final void onDisable() {
623623
if (shopManager != null) {
624624
shopManager.clear();
625625
}
626-
if (DisplayItem.getNowUsing() == DisplayType.VIRTUALITEM) {
626+
if (AbstractDisplayItem.getNowUsing() == DisplayType.VIRTUALITEM) {
627627
VirtualDisplayItem.VirtualDisplayItemManager.unload();
628628
}
629629

@@ -869,7 +869,7 @@ public final void onEnable() {
869869

870870
signUpdateWatcher = new SignUpdateWatcher();
871871
shopContainerWatcher = new ShopContainerWatcher();
872-
if (display && DisplayItem.getNowUsing() != DisplayType.VIRTUALITEM) {
872+
if (display && AbstractDisplayItem.getNowUsing() != DisplayType.VIRTUALITEM) {
873873
displayDupeRemoverWatcher = new DisplayDupeRemoverWatcher();
874874
timerTaskList.add(displayDupeRemoverWatcher.runTaskTimerAsynchronously(this, 0, 1));
875875
}
@@ -894,7 +894,7 @@ public final void onEnable() {
894894
ongoingFeeWatcher = new OngoingFeeWatcher(this);
895895
InternalListener internalListener = new InternalListener(this);
896896
Bukkit.getPluginManager().registerEvents(internalListener, this);
897-
if (isDisplay() && DisplayItem.getNowUsing() != DisplayType.VIRTUALITEM) {
897+
if (isDisplay() && AbstractDisplayItem.getNowUsing() != DisplayType.VIRTUALITEM) {
898898
displayWatcher = new DisplayWatcher(this);
899899
new DisplayProtectionListener(this, this.shopCache).register();
900900
if (Bukkit.getPluginManager().getPlugin("ClearLag") != null) {
@@ -954,7 +954,7 @@ public void run() {
954954
calendarWatcher.start();
955955
this.shopPurger = new ShopPurger(this, false);
956956
shopPurger.runTaskAsynchronously(this);
957-
Util.debugLog("Now using display-type: " + DisplayItem.getNowUsing().name());
957+
Util.debugLog("Now using display-type: " + AbstractDisplayItem.getNowUsing().name());
958958
getLogger().info("QuickShop Loaded! " + enableTimer.stopAndGetTimePassed() + " ms.");
959959

960960
// TODO: Test code
@@ -1061,7 +1061,7 @@ private void submitMeritcs() {
10611061
metrics.addCustomChart(new Metrics.SimplePie("use_enhance_shop_protect", () -> String.valueOf(getConfig().getBoolean("shop.enchance-shop-protect"))));
10621062
metrics.addCustomChart(new Metrics.SimplePie("use_ongoing_fee", () -> String.valueOf(getConfig().getBoolean("shop.ongoing-fee.enable"))));
10631063
metrics.addCustomChart(new Metrics.SimplePie("database_type", () -> this.getDatabaseManager().getDatabase().getName()));
1064-
metrics.addCustomChart(new Metrics.SimplePie("display_type", () -> DisplayItem.getNowUsing().name()));
1064+
metrics.addCustomChart(new Metrics.SimplePie("display_type", () -> AbstractDisplayItem.getNowUsing().name()));
10651065
metrics.addCustomChart(new Metrics.SimplePie("itemmatcher_type", () -> this.getItemMatcher().getName()));
10661066
metrics.addCustomChart(new Metrics.SimplePie("use_stack_item", () -> String.valueOf(this.isAllowStack())));
10671067
metrics.addCustomChart(new Metrics.SimplePie("chat_adapter", () -> "Hardcoded Adventure"));

src/main/java/org/maxgamer/quickshop/api/DisplayItemAPI.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.bukkit.inventory.ItemStack;
2424
import org.jetbrains.annotations.NotNull;
2525
import org.maxgamer.quickshop.QuickShop;
26-
import org.maxgamer.quickshop.shop.DisplayItem;
26+
import org.maxgamer.quickshop.shop.AbstractDisplayItem;
2727
import org.maxgamer.quickshop.shop.DisplayType;
2828
import org.maxgamer.quickshop.shop.Shop;
2929

@@ -38,7 +38,7 @@ public class DisplayItemAPI {
3838
* @return yes or no
3939
*/
4040
public static boolean isDisplayItem(@NotNull ItemStack itemStack) {
41-
return DisplayItem.checkIsGuardItemStack(itemStack);
41+
return AbstractDisplayItem.checkIsGuardItemStack(itemStack);
4242
}
4343

4444
/**
@@ -49,7 +49,7 @@ public static boolean isDisplayItem(@NotNull ItemStack itemStack) {
4949
* @return yes or no
5050
*/
5151
public static boolean isShopDisplayItem(@NotNull ItemStack itemStack, @NotNull Shop shop) {
52-
return DisplayItem.checkIsTargetShopDisplay(itemStack, shop);
52+
return AbstractDisplayItem.checkIsTargetShopDisplay(itemStack, shop);
5353
}
5454

5555
/**
@@ -58,6 +58,6 @@ public static boolean isShopDisplayItem(@NotNull ItemStack itemStack, @NotNull S
5858
* @return The type of display now using
5959
*/
6060
public static DisplayType getNowUsing() {
61-
return DisplayItem.getNowUsing();
61+
return AbstractDisplayItem.getNowUsing();
6262
}
6363
}

src/main/java/org/maxgamer/quickshop/event/QSEvent.java renamed to src/main/java/org/maxgamer/quickshop/event/AbstractQSEvent.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This file is a part of project QuickShop, the name is QSEvent.java
2+
* This file is a part of project QuickShop, the name is AbstractQSEvent.java
33
* Copyright (C) PotatoCraft Studio and contributors
44
*
55
* This program is free software: you can redistribute it and/or modify it
@@ -25,15 +25,15 @@
2525
import org.jetbrains.annotations.NotNull;
2626
import org.maxgamer.quickshop.QuickShop;
2727

28-
public abstract class QSEvent extends Event {
28+
public abstract class AbstractQSEvent extends Event {
2929

3030
private static final HandlerList HANDLERS = new HandlerList();
3131

32-
public QSEvent() {
32+
public AbstractQSEvent() {
3333

3434
}
3535

36-
public QSEvent(boolean async) {
36+
public AbstractQSEvent(boolean async) {
3737
super(async);
3838
}
3939

src/main/java/org/maxgamer/quickshop/event/CalendarEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
@EqualsAndHashCode(callSuper = true)
2727
@AllArgsConstructor
2828
@Data
29-
public class CalendarEvent extends QSEvent {
29+
public class CalendarEvent extends AbstractQSEvent {
3030
private CalendarTriggerType calendarTriggerType;
3131

3232
public enum CalendarTriggerType {

src/main/java/org/maxgamer/quickshop/event/EconomyCommitEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/**
2727
* Calling when transaction will commit
2828
*/
29-
public class EconomyCommitEvent extends QSEvent implements Cancellable {
29+
public class EconomyCommitEvent extends AbstractQSEvent implements Cancellable {
3030
private final EconomyTransaction transaction;
3131
private boolean cancelled;
3232

src/main/java/org/maxgamer/quickshop/event/QSReloadEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
import org.maxgamer.quickshop.QuickShop;
2323

24-
public class QSReloadEvent extends QSEvent {
24+
public class QSReloadEvent extends AbstractQSEvent {
2525

2626
private final QuickShop instance;
2727

src/main/java/org/maxgamer/quickshop/event/ShopClickEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/**
2727
* Calling when shop clicked
2828
*/
29-
public class ShopClickEvent extends QSEvent implements Cancellable {
29+
public class ShopClickEvent extends AbstractQSEvent implements Cancellable {
3030

3131
@NotNull
3232
private final Shop shop;

src/main/java/org/maxgamer/quickshop/event/ShopControlPanelOpenEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
/**
2828
* Calling when control panel opened for
2929
*/
30-
public class ShopControlPanelOpenEvent extends QSEvent implements Cancellable {
30+
public class ShopControlPanelOpenEvent extends AbstractQSEvent implements Cancellable {
3131
private final Shop shop;
3232
private final CommandSender sender;
3333
private boolean cancelled = false;

src/main/java/org/maxgamer/quickshop/event/ShopCreateEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
/**
3232
* Calling when new shop creating
3333
*/
34-
public class ShopCreateEvent extends QSEvent implements Cancellable {
34+
public class ShopCreateEvent extends AbstractQSEvent implements Cancellable {
3535

3636
@NotNull
3737
private final UUID creator;

src/main/java/org/maxgamer/quickshop/event/ShopDeleteEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/**
2727
* Calling when shop deleting
2828
*/
29-
public class ShopDeleteEvent extends QSEvent implements Cancellable {
29+
public class ShopDeleteEvent extends AbstractQSEvent implements Cancellable {
3030

3131
private final boolean fromMemory;
3232

0 commit comments

Comments
 (0)