1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-26 12:35:28 +01:00

Fix NPE when someone removed the section from shop file

This commit is contained in:
montlikadani 2020-02-20 16:27:07 +01:00
parent 204b506868
commit 5f4713a68a

View File

@ -315,6 +315,9 @@ public class ShopManager {
int y = 1; int y = 1;
for (String category : categoriesList) { for (String category : categoriesList) {
ConfigurationSection NameSection = ConfCategory.getConfigurationSection(category); ConfigurationSection NameSection = ConfCategory.getConfigurationSection(category);
if (NameSection == null) {
continue;
}
if (!NameSection.isDouble("Price")) { if (!NameSection.isDouble("Price")) {
Jobs.getPluginLogger().severe("Shop item " + category + " has an invalid Price property. Skipping!"); Jobs.getPluginLogger().severe("Shop item " + category + " has an invalid Price property. Skipping!");