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:
parent
204b506868
commit
5f4713a68a
@ -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!");
|
||||||
|
Loading…
Reference in New Issue
Block a user