Skip to content

Commit 839766f

Browse files
authored
Merge pull request Ghost-chu#1564 from Ghost-chu/master
5.0.0.8
2 parents 344c4f2 + 70124e2 commit 839766f

File tree

14 files changed

+27
-103
lines changed

14 files changed

+27
-103
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: 'Report a bug with QuickShop to us.'
33

44
title: '[BUG] '
55
labels:
6-
- 'bug'
6+
- 'Bug'
77

88
body:
99
- type: 'markdown'
@@ -62,7 +62,7 @@ body:
6262
If you can't create a paste, should you upload other files such as the `latest.log` file to https://paste.helpch.at and share the URL.
6363
6464
If QuickShop is unable to generate a Paste will it create a file under `plugins/QuickShop/`
65-
placeholder: 'https://paste.ubuntu.com/p/abc123/'
65+
placeholder: 'https://paste.helpch.at/...'
6666
validations:
6767
required: true
6868
- type: 'textarea'

.github/ISSUE_TEMPLATE/performance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: 'Report performance issues with QuickShop.'
33

44
title: '[PERFORMANCE] '
55
labels:
6-
- 'performance'
6+
- 'Performance Issue'
77

88
body:
99
- type: 'markdown'
@@ -66,7 +66,7 @@ body:
6666
If you can't create a paste, should you upload other files such as the `latest.log` file to https://paste.helpch.at and share the URL.
6767
6868
If QuickShop is unable to generate a Paste will it create a file under `plugins/QuickShop/`
69-
placeholder: 'https://paste.ubuntu.com/p/abc123/'
69+
placeholder: 'https://paste.helpch.at/...'
7070
validations:
7171
required: true
7272
- type: 'input'

.github/ISSUE_TEMPLATE/wiki_contribution.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: 'Inform about a Contribution that you want to make towards the wiki
33

44
title: '[WIKI] '
55
labels:
6-
- 'wiki'
6+
- 'Wiki'
77

88
body:
99
- type: 'markdown'

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<artifactId>QuickShop</artifactId>
2626

2727
<properties>
28-
<pluginver>5.0.0.7</pluginver>
28+
<pluginver>5.0.0.8</pluginver>
2929
<package>org.maxgamer.quickshop</package>
3030
<developer>Ghost-chu</developer>
3131
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,4 @@ public static BootError econError() {
6666
"compatible economy plugin installed to get Vault working.");
6767
}
6868

69-
/**
70-
* Call îf economy system failed to load. This checks the failure reason.
71-
*
72-
* @return The error reason.
73-
*/
74-
public static BootError econHandlerMissingError() {
75-
// Check if Vault is installed
76-
return new BootError(QuickShop.getInstance().getLogger(),
77-
"The selected economy handler not installed", "Please check the configuration.");
78-
}
79-
8069
}

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

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
import org.maxgamer.quickshop.chat.platform.minedown.BungeeQuickChat;
6363
import org.maxgamer.quickshop.command.SimpleCommandManager;
6464
import org.maxgamer.quickshop.database.*;
65-
import org.maxgamer.quickshop.economy.EconomyProviderNotFoundException;
6665
import org.maxgamer.quickshop.economy.Economy_GemsEconomy;
6766
import org.maxgamer.quickshop.economy.Economy_TNE;
6867
import org.maxgamer.quickshop.economy.Economy_Vault;
@@ -498,21 +497,13 @@ public boolean loadEcon() {
498497
return false;
499498
}
500499
economy = ServiceInjector.getEconomy(economy);
501-
if (Objects.equals(this.bootError, BuiltInSolution.econHandlerMissingError()) || Objects.equals(this.bootError, BuiltInSolution.econError())) {
502-
this.bootError = null;
503-
}
504500
} catch (Exception e) {
505-
if (e instanceof EconomyProviderNotFoundException) {
506-
getLogger().log(Level.WARNING, "Something going wrong when loading up economy system", e);
507-
getLogger().severe("Failed to hook into the Economy Handler that configuration point to!");
508-
getLogger().severe("QuickShop CANNOT start!");
509-
setupBootError(BuiltInSolution.econHandlerMissingError(), false);
510-
} else {
511-
getLogger().log(Level.WARNING, "Something going wrong when loading up economy system", e);
512-
getLogger().severe("QuickShop could not hook into a economy/Not found Vault or Reserve!");
513-
getLogger().severe("QuickShop CANNOT start!");
514-
setupBootError(BuiltInSolution.econError(), false);
515-
}
501+
this.getSentryErrorReporter().ignoreThrow();
502+
getLogger().log(Level.WARNING, "Something going wrong when loading up economy system", e);
503+
getLogger().severe("QuickShop could not hook into a economy/Not found Vault or Reserve!");
504+
getLogger().severe("QuickShop CANNOT start!");
505+
setupBootError(BuiltInSolution.econError(), false);
506+
getLogger().severe("Plugin listeners was disabled, please fix the economy issue.");
516507
return false;
517508
}
518509
return true;

src/main/java/org/maxgamer/quickshop/economy/EconomyProviderNotFoundException.java

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/main/java/org/maxgamer/quickshop/economy/Economy_GemsEconomy.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import lombok.ToString;
2525
import me.xanium.gemseconomy.api.GemsEconomyAPI;
2626
import me.xanium.gemseconomy.currency.Currency;
27-
import org.bukkit.Bukkit;
2827
import org.bukkit.OfflinePlayer;
2928
import org.bukkit.World;
3029
import org.bukkit.plugin.Plugin;
@@ -48,7 +47,7 @@ public class Economy_GemsEconomy extends AbstractEconomy {
4847
@Setter
4948
private GemsEconomyAPI api;
5049

51-
public Economy_GemsEconomy(@NotNull QuickShop plugin) throws EconomyProviderNotFoundException {
50+
public Economy_GemsEconomy(@NotNull QuickShop plugin) {
5251
super();
5352
this.plugin = plugin;
5453
this.formatter = new BuiltInEconomyFormatter(plugin);
@@ -62,10 +61,7 @@ private void init() {
6261
this.allowLoan = plugin.getConfiguration().getBoolean("shop.allow-economy-loan");
6362
}
6463

65-
private void setupEconomy() throws EconomyProviderNotFoundException {
66-
if (Bukkit.getPluginManager().getPlugin("GemsEconomy") == null) {
67-
throw new EconomyProviderNotFoundException("Configuration set economy to GemsEconomy but GemsEconomy not installed");
68-
}
64+
private void setupEconomy() {
6965
this.api = new GemsEconomyAPI();
7066
}
7167

src/main/java/org/maxgamer/quickshop/economy/Economy_Reserve.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class Economy_Reserve extends AbstractEconomy {
6262
* @deprecated Reserve no-longer active after Minecraft 1.14.
6363
*/
6464
@Deprecated
65-
public Economy_Reserve(@NotNull QuickShop plugin) throws EconomyProviderNotFoundException {
65+
public Economy_Reserve(@NotNull QuickShop plugin) {
6666
this.plugin = plugin;
6767
this.formatter = new BuiltInEconomyFormatter(plugin);
6868
plugin.getReloadManager().register(this);
@@ -71,19 +71,14 @@ public Economy_Reserve(@NotNull QuickShop plugin) throws EconomyProviderNotFound
7171
}
7272

7373
@SuppressWarnings("ConstantConditions")
74-
private void setup() throws EconomyProviderNotFoundException {
74+
private void setup() {
7575
try {
76-
Plugin pl = plugin.getServer().getPluginManager().getPlugin("Reserve");
77-
if (pl == null) {
78-
throw new EconomyProviderNotFoundException("Configuration set economy to Reserve but Reserve not installed");
79-
}
8076
Reserve re = ((Reserve) plugin.getServer().getPluginManager().getPlugin("Reserve"));
8177
if (re.economyProvided()) {
8278
reserve = re.economy();
8379
}
8480
} catch (Exception throwable) {
8581
reserve = null;
86-
plugin.getLogger().log(Level.SEVERE, "Failed to load up Reserve", throwable);
8782
}
8883
}
8984

src/main/java/org/maxgamer/quickshop/economy/Economy_TNE.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class Economy_TNE extends AbstractEconomy {
4949
@Setter
5050
private TNEAPI api;
5151

52-
public Economy_TNE(@NotNull QuickShop plugin) throws EconomyProviderNotFoundException {
52+
public Economy_TNE(@NotNull QuickShop plugin) {
5353
super();
5454
this.plugin = plugin;
5555
plugin.getReloadManager().register(this);
@@ -61,12 +61,7 @@ private void init() {
6161
this.allowLoan = plugin.getConfiguration().getBoolean("shop.allow-economy-loan");
6262
}
6363

64-
private void setupEconomy() throws EconomyProviderNotFoundException {
65-
if (Bukkit.getPluginManager().getPlugin("TNE") == null
66-
&& Bukkit.getPluginManager().getPlugin("TNE-Bukkit") == null
67-
&& Bukkit.getPluginManager().getPlugin("TheNewEconomy") == null) {
68-
throw new EconomyProviderNotFoundException("Configuration set economy to TheNewEconomy but TheNewEconomy not installed");
69-
}
64+
private void setupEconomy() {
7065
this.api = TNE.instance().api();
7166
}
7267

0 commit comments

Comments
 (0)