mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-25 01:49:49 -05:00
Merge branch 'master' of github.com:Ghost-chu/QuickShop-Reremake
Former-commit-id: 9d7d7bfa2547c0eaa9a219f29bf7209ab14921d9
This commit is contained in:
commit
95aee057ae
3 files changed
+12
-9
No files matched your search
@@ -638,7 +638,7 @@ public class QuickShop extends JavaPlugin {
|
||||
if (this.display) {
|
||||
if (getConfig().getBoolean("shop.display-auto-despawn")) {
|
||||
this.displayAutoDespawnWatcher = new DisplayAutoDespawnWatcher(this);
|
||||
this.displayAutoDespawnWatcher.runTaskTimer(this, 0, getConfig().getInt("shop.display-check-time")); // not worth async
|
||||
this.displayAutoDespawnWatcher.runTaskTimerAsynchronously(this, 0, getConfig().getInt("shop.display-check-time")); // not worth async
|
||||
}
|
||||
}
|
||||
registerIntegrations();
|
||||
|
||||
@@ -55,6 +55,7 @@ public class ContainerShop implements Shop {
|
||||
private final ItemStack item;
|
||||
@NotNull
|
||||
private final Location location;
|
||||
@Nullable
|
||||
private DisplayItem displayItem;
|
||||
@EqualsAndHashCode.Exclude
|
||||
private boolean isLoaded = false;
|
||||
@@ -565,7 +566,7 @@ public class ContainerShop implements Shop {
|
||||
*
|
||||
* @return The display item associated with this shop.
|
||||
*/
|
||||
@NotNull
|
||||
@Nullable
|
||||
public DisplayItem getDisplayItem() {
|
||||
return this.displayItem;
|
||||
}
|
||||
@@ -874,7 +875,7 @@ public class ContainerShop implements Shop {
|
||||
}
|
||||
|
||||
this.isLoaded = true;
|
||||
plugin.getShopManager().getLoadedShops().add(this);
|
||||
Objects.requireNonNull(plugin.getShopManager().getLoadedShops()).add(this);
|
||||
plugin.getShopContainerWatcher().scheduleCheck(this);
|
||||
// check price restriction
|
||||
Entry<Double, Double> priceRestriction = Util.getPriceRestriction(this.getMaterial());
|
||||
|
||||
@@ -206,7 +206,8 @@ public class Util {
|
||||
}
|
||||
}
|
||||
long startTime = System.currentTimeMillis();
|
||||
String className = Thread.currentThread().getStackTrace()[2].getClassName();
|
||||
StackTraceElement stackTraceElement = Thread.currentThread().getStackTrace()[2];
|
||||
String className = stackTraceElement.getClassName();
|
||||
try {
|
||||
Class<?> c = Class.forName(className);
|
||||
className = c.getSimpleName();
|
||||
@@ -216,8 +217,8 @@ public class Util {
|
||||
} catch (ClassNotFoundException e) {
|
||||
//Ignore
|
||||
}
|
||||
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
|
||||
int codeLine = Thread.currentThread().getStackTrace()[2].getLineNumber();
|
||||
String methodName = stackTraceElement.getMethodName();
|
||||
int codeLine = stackTraceElement.getLineNumber();
|
||||
|
||||
for (String log : logs) {
|
||||
String text = "[" + ChatColor.DARK_GREEN + ChatColor.BOLD + "DEBUG" + ChatColor.RESET + "] [" + ChatColor.DARK_GREEN + className + ChatColor.RESET + "]" + " [" + ChatColor.DARK_GREEN + methodName + ChatColor.RESET + "] (" + ChatColor.DARK_GREEN + codeLine + ChatColor.RESET + ") " + log;
|
||||
@@ -254,7 +255,8 @@ public class Util {
|
||||
return;
|
||||
}
|
||||
long startTime = System.currentTimeMillis();
|
||||
String className = Thread.currentThread().getStackTrace()[2].getClassName();
|
||||
StackTraceElement stackTraceElement = Thread.currentThread().getStackTrace()[2];
|
||||
String className = stackTraceElement.getClassName();
|
||||
try {
|
||||
Class<?> c = Class.forName(className);
|
||||
className = c.getSimpleName();
|
||||
@@ -264,8 +266,8 @@ public class Util {
|
||||
} catch (ClassNotFoundException e) {
|
||||
//Ignore
|
||||
}
|
||||
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
|
||||
int codeLine = Thread.currentThread().getStackTrace()[2].getLineNumber();
|
||||
String methodName = stackTraceElement.getMethodName();
|
||||
int codeLine = stackTraceElement.getLineNumber();
|
||||
|
||||
for (String log : logs) {
|
||||
String text = "[" + ChatColor.DARK_GREEN + ChatColor.BOLD + "DEBUG" + ChatColor.RESET + "] [" + ChatColor.DARK_GREEN + className + ChatColor.RESET + "]" + " [" + ChatColor.DARK_GREEN + methodName + ChatColor.RESET + "] (" + ChatColor.DARK_GREEN + codeLine + ChatColor.RESET + ") " + log;
|
||||
|
||||
Reference in new issue
Block a user