Skip to content
This repository has been archived by the owner on Dec 5, 2021. It is now read-only.

Commit

Permalink
Fix paste NPE
Browse files Browse the repository at this point in the history
Former-commit-id: dc56783
  • Loading branch information
Ghost-chu committed Jan 11, 2020
1 parent b6607de commit 742b4ff
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions src/main/java/org/maxgamer/quickshop/Util/Paste/Paste.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,23 @@ public class Paste {
finalReport.append("\tServer ID: ").append(plugin.getServerUniqueID()).append("\n");
finalReport.append("\tOpenInv Hook: ").append(plugin.getOpenInvPlugin() == null ? "Disabled" : "Enabled").append("\n");
finalReport.append("\tEconomy System: ");
EconomyCore economyCore = plugin.getEconomy().getCore();
switch (Economy.getNowUsing()) {
case VAULT:
finalReport.append("Vault").append("%").append(((Economy_Vault) economyCore).getProviderName());
break;
case RESERVE:
finalReport.append("Reserve").append("%").append("No details");
break;
case UNKNOWN:
finalReport.append("Unknown").append("%").append("Unknown error");
break;
try {
EconomyCore economyCore = plugin.getEconomy().getCore();
switch (Economy.getNowUsing()) {
case VAULT:
finalReport.append("Vault").append("%").append(((Economy_Vault) economyCore).getProviderName());
break;
case RESERVE:
finalReport.append("Reserve").append("%").append("No details");
break;
case UNKNOWN:
finalReport.append("Unknown").append("%").append("Unknown error");
break;
}
}catch(Exception e){
finalReport.append("Unknown").append("%").append("Unknown error");
}

finalReport.append("\n");
finalReport.append("================================================\n");
finalReport.append("System:\n");
Expand Down

0 comments on commit 742b4ff

Please sign in to comment.