Fixed dupe bug

Fixed null pointer error
Pray to build bot this builds...
This commit is contained in:
Ethan 2020-07-30 01:50:46 -04:00
parent 028b2161a2
commit 9332aeb17d
3 changed files with 6 additions and 4 deletions

View File

@ -50,11 +50,11 @@ public class CraftingRecipe extends Recipe {
* yaml format is 'output-item: false' under options
*/
public boolean isItemRecipe() {
return config.getConfigurationSection("options").getBoolean("output-item", true);
return config.getBoolean("options.output-item", true);
}
public boolean isSilent() {
return config.getConfigurationSection("options").getBoolean("silent-craft", false);
return config.getBoolean("options.silent-craft", false);
}
public ConfigMMOItem getOutput() {

View File

@ -12,7 +12,7 @@ public class CommandTrigger extends Trigger {
super("command");
config.validate("format");
player = config.getBoolean("player");
player = config.getBoolean("player", false);
command = config.getString("format");
}

View File

@ -189,10 +189,12 @@ public class CraftingStationView extends PluginInventory {
data.getPlayer().playSound(data.getPlayer().getLocation(), Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 1);
if (recipe.isItemRecipe())
new SmartGive(data.getPlayer()).give(craftedItem);
} else
}
else {
data.getPlayer().playSound(data.getPlayer().getLocation(), Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1, 1);
for (Ingredient ingredient : craft.getRecipe().getIngredients())
new SmartGive(data.getPlayer()).give(ingredient.generateItemStack());
}
updateData();
open();