Some changes

Former-commit-id: 14e47be19141c077195f4c01e77dbdf30208525b [formerly 33a41465305fa2243eb1cee00132ec4741435dda]
Former-commit-id: 7871566874ee289e0e0f47dfef1464b4ee614e2f
This commit is contained in:
Ghost_chu committed 2019-06-29 19:08:31 +08:00
1 parent 6e57248f0e
commit bad8bf6887
5 files changed
+16 -4

No files matched your search

@@ -7,6 +7,7 @@ import org.bukkit.ChatColor;
* A class to check known issue cause plugin failed enable.
*/
class BuiltInSolution {
private static QuickShop plugin = QuickShop.instance;
/**
* Call when failed load economy system, and use this to check the reason.
*
@@ -25,9 +26,10 @@ class BuiltInSolution {
// Vault is installed
if (Bukkit.getPluginManager().getPlugin("CMI") != null) {
// Found may in-compatiable plugin
return new BootError("No Economy plugin loaded", "Make sure you have an economy plugin hooked into Vault or Reserve.", ChatColor.YELLOW + "Incompatibility detected: CMI Installed", "Download CMI Edition of Vault might fix this.");
return new BootError("No Economy plugin detected, did you installed and loaded them? Make sure they loaded before QuickShop.", "Make sure you have an economy plugin hooked into Vault or Reserve.", ChatColor.YELLOW + "Incompatibility detected: CMI Installed", "Download CMI Edition of Vault might fix this.");
}
return new BootError("No Economy plugin loaded", "Install an economy plugin to get Vault or Reserve working.");
return new BootError("No Economy plugin detected, did you installed and loaded them? Make sure they loaded before QuickShop.", "Install an economy plugin to get Vault or Reserve working.");
}
/**
@@ -2,11 +2,14 @@ package org.maxgamer.quickshop.Economy;
import java.util.UUID;
import lombok.*;
import org.jetbrains.annotations.*;
import org.maxgamer.quickshop.QuickShop;
import org.maxgamer.quickshop.Util.Util;
public class Economy implements EconomyCore {
@Getter
@Setter
private EconomyCore core;
private QuickShop plugin = QuickShop.instance;
@@ -3,6 +3,7 @@ package org.maxgamer.quickshop.Economy;
import java.math.BigDecimal;
import java.util.UUID;
import lombok.*;
import net.tnemc.core.Reserve;
import net.tnemc.core.economy.EconomyAPI;
import org.bukkit.Bukkit;
@@ -12,7 +13,8 @@ import org.maxgamer.quickshop.QuickShop;
* @author creatorfromhell
*/
public class Economy_Reserve implements EconomyCore {
@Getter
@Setter
private EconomyAPI reserve = null;
private QuickShop plugin = QuickShop.instance;
final private String errorMsg = "QuickShop got an error when calling your Economy system, this is NOT a QuickShop error, please do not report this issue to the QuickShop's Issue tracker, ask your Economy plugin's author.";
@@ -2,6 +2,7 @@ package org.maxgamer.quickshop.Economy;
import java.util.UUID;
import lombok.*;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
@@ -10,6 +11,8 @@ import org.jetbrains.annotations.*;
import org.maxgamer.quickshop.QuickShop;
public class Economy_Vault implements EconomyCore {
@Getter
@Setter
private Economy vault;
private QuickShop plugin = QuickShop.instance;
final private String errorMsg = "QuickShop got an error when calling your Economy system, this is NOT a QuickShop error, please do not report this issue to the QuickShop's Issue tracker, ask your Economy plugin's author.";
@@ -27,7 +30,7 @@ public class Economy_Vault implements EconomyCore {
}
if (economyProvider != null) {
this.vault = ((Economy) economyProvider.getProvider());
this.vault = economyProvider.getProvider();
}
return this.vault != null;
}
@@ -807,6 +807,7 @@ public class QuickShop extends JavaPlugin {
return true;
}
} catch (Exception e) {
this.getSentryErrorReporter().ignoreThrow();
e.printStackTrace();
getLogger().severe("QuickShop could not hook into a economy/Not found Vault or Reserve!");
getLogger().severe("QuickShop CANNOT start!");
@@ -850,6 +851,7 @@ public class QuickShop extends JavaPlugin {
try {
this.database.getConnection().close();
} catch (SQLException e) {
this.getSentryErrorReporter().ignoreThrow();
e.printStackTrace();
}